Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3daf189

Browse filesBrowse files
jamadagnifacchinm
authored andcommitted
Add bitToggle macro to complement bitSet etc
Port of arduino/ArduinoCore-avr@0c5aa78 Reference PR: arduino/ArduinoCore-avr#31
1 parent 6dec2cb commit 3daf189
Copy full SHA for 3daf189

File tree

1 file changed

+1
-0
lines changed
Filter options

1 file changed

+1
-0
lines changed

‎api/Common.h

Copy file name to clipboardExpand all lines: api/Common.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ typedef void (*voidFuncPtrParam)(void*);
6464
#define bitRead(value, bit) (((value) >> (bit)) & 0x01)
6565
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
6666
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
67+
#define bitToggle(value, bit) ((value) ^= (1UL << (bit)))
6768
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
6869

6970
#ifndef bit

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.