From 6762e636ff629a0c93f4950ba121d3dff5b3b3b7 Mon Sep 17 00:00:00 2001 From: James Foster Date: Thu, 1 Jul 2021 13:15:47 -0700 Subject: [PATCH] Add `_BV()` macro. --- CHANGELOG.md | 1 + cpp/arduino/Arduino.h | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f29be1a6..e2db134a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Change 266 files from CRLF to LF. +- Add `_BV()` macro. ### Deprecated diff --git a/cpp/arduino/Arduino.h b/cpp/arduino/Arduino.h index ad7d5a99..d613a9ff 100644 --- a/cpp/arduino/Arduino.h +++ b/cpp/arduino/Arduino.h @@ -50,10 +50,7 @@ typedef uint8_t byte; typedef unsigned int word; -#define bit(b) (1UL << (b)) - - - +#define _BV(bit) (1 << (bit)) // Get the bit location within the hardware port of the given virtual pin. // This comes from the pins_*.c file for the active board configuration.