Playing with Arduino
A page to record my playing with Arduino
bit_is_set()

Abstcact

The bit_is_set() is a macro that checks if the second argumen-th bit of the first argument is 1.

Source Code

The bit_is_set() is defined in hardware/tools/avr/avr/include/avr/sfr_defs.h as below.

1
#define bit_is_set(sfr, bit) (_SFR_BYTE(sfr) & _BV(bit))

It calculates the logical AND of _SFR_BYTE(str) and _BV(bit).

Version

Arduino 1.8.13/avr-gcc 7.3.0-atmel3.6.1-arduino

Last Update

June 19, 2020

inserted by FC2 system