This example sends packets continuously. The contents of P0 are sent in the first payload byte (byte 0).
Protocol parameters such as addresses and channels are specified in gazell_examples/params/gzll_params.h.
The project Gazell Link Layer Host example can be used as a counterpart for receiving the data.
Functions | |
void | main (void) |
void main | ( | void | ) |
Definition at line 36 of file main.c.
{ uint8_t payload[GZLL_MAX_PAYLOAD_LENGTH]; mcu_init(); gzll_init(); EA = 1; for(;;) { // If gazell link layer idle if(gzll_get_state() == GZLL_IDLE) { // Put P0 contents in payload[0] payload[0] = ~P0; // Transmits payload[] to pipe 0 address gzll_tx_data(payload, GZLL_MAX_FW_PAYLOAD_LENGTH, 0); } } }