Skip to content

Commit ffe8a12

Browse files
author
James Foster
authored
Merge pull request #304 from jgfoster/BV_macro
Add `_BV()` macro definition
2 parents c42c725 + 71a5ce3 commit ffe8a12

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515
- Properly report compile errors in GitHub Actions (#296)
1616
- Put build artifacts in a separate directory to reduce clutter.
1717
- Change 266 files from CRLF to LF.
18+
- Add `_BV()` macro.
1819
- Replace `#define yield() _NOP()` with `inline void yield() { _NOP(); }` so that other code can define a `yield()` function.
1920
- Update .gitattributes so we have consistent line endings
2021
- Run tests on push as well as on a pull request so developers can see impact

cpp/arduino/Arduino.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ inline void noInterrupts() { _NOP(); }
5050

5151
typedef unsigned int word;
5252

53-
#define bit(b) (1UL << (b))
54-
55-
56-
53+
#define _BV(bit) (1 << (bit))
5754

5855
// Get the bit location within the hardware port of the given virtual pin.
5956
// This comes from the pins_*.c file for the active board configuration.

0 commit comments

Comments
 (0)