This example listens for data and writes the first byte (byte 0) of the received payloads to P0.
Protocol parameters such as addresses and channels are specified in gazell_examples/params/gzll_params.h.
The project Gazell Link Layer Device example can be used as a counterpart for transmitting the data.
Functions | |
void | main (void) |
Variables | |
uint8_t | packet_cnt = 0 |
void main | ( | void | ) |
Definition at line 33 of file main.c.
{ uint8_t payload[GZLL_MAX_PAYLOAD_LENGTH]; mcu_init(); gzll_init(); // Set P0 as output P0DIR = 0; EA = 1; // Enter host mode (start monitoring for data) gzll_rx_start(); for(;;) { // If data received if(gzll_rx_fifo_read(payload, NULL, NULL)) { // Write received payload[0] to port 0 P0 = payload[0]; } } }
uint8_t packet_cnt = 0 |