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

Abstcact

The bit_is_clear() is a macro that checks if the second argument-th bit of the first argument is 0.

Source Code

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

1
#define bit_is_clear(sfr, bit) (!(_SFR_BYTE(sfr) & _BV(bit)))

It calculates the logical NOT after calculating 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