8.6.5 loop_until_bit_is_set Macro
A macro that waits until a bit becomes set in an SFR.
Include
<avr/sfr_defs.h>
Prototype
int loop_until_bit_is_set(sfr, bit_number);
Remarks
This macro loops until the specified bit in sfr
becomes set.
Example
#include <xc.h>
#include <avr/sfr_defs.h>
int main(void)
{
startConversion();
loop_until_bit_is_set(ADCSRA, ADIF);
}