#define loop_until_bit_is_clear(sfr,bit) \
	do { } while (bit_is_set(sfr, bit)) 
#include <avr/io.h>

Wait until bit bit in IO register sfr is clear.