#define bit_is_set(sfr,bit) \
	(_SFR_BYTE(sfr) & _BV(bit)) 
#include <avr/io.h>

Test whether bit bit in IO register sfr is set. This will return a 0 if the bit is clear, and non-zero if the bit is set.