You are here: Forum Home → ANT Developers Forums → ANT General Questions → Thread
#define SYNC_SCLK_EDGE_DETECT() (SYNC_SCLK_IFG & SYNC_SCLK_BIT) // this must be an edge interrupt flag
#define SYNC_SCLK_EDGE_CLEAR() (SYNC_SCLK_IFG &= ~SYNC_SCLK_BIT) // clear the interrupt flag
#define SYNC_SRDY_ASSERT() (SYNC_SRDY_OUT &= ~SYNC_SRDY_BIT) // active low
#define SYNC_SRDY_DEASSERT() (SYNC_SRDY_OUT |= SYNC_SRDY_BIT)
/// this is a delay of at least 2.5us
#define SYNC_SRDY_PULSE() { SYNC_SRDY_ASSERT();\
TIMER_SRDY_PULSE_DELAY();\
TIMER_SRDY_PULSE_DELAY();\
SYNC_SRDY_DEASSERT(); }
while (IS_SMSGRDY_ASSERTED() || IS_SEN_ASSERTED()) // while we have a message to send or a message to receive
{
while (!IS_SEN_ASSERTED()); // make sure SEN is asserted