8.6.3 bit_is_set Macro

A macro that returns true if a bit is set in an SFR.

Include

<avr/sfr_defs.h>

Prototype

int _bit_is_set(sfr, bit_number);

Remarks

This macro tests to see if the specified bit in sfr is set, returning true if that is the case; 0 otherwise.

Example

#include <xc.h>
#include <avr/sfr_defs.h>
int main(void)
{
  if(bit_is_set(EIMSK, PCIE2))
    proceed = 0;
}