rn4870 2.0.0.0
|
Rn4870 Click example. More...
Macros | |
#define | PROCESS_COUNTER 10 |
#define | PROCESS_RX_BUFFER_SIZE 500 |
#define | PROCESS_PARSER_BUFFER_SIZE 500 |
#define | DEMO_APP_TRANSMITER |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
Variables | |
uint8_t | RN4870_ADDR_MASTER [13] = {'D', 'F', '0', '0', '0', '0', '0', '6', '8', '7', '9', '0'} |
uint8_t | RN4870_ADDR_SLAVE [13] = {'D', 'F', '1', '1', '1', '1', '1', '6', '8', '7', '9', '0'} |
uint8_t | message_payload [17] = {'M', 'i', 'k', 'r', 'o', 'E', 'l', 'e', 'k', 't', 'r', 'o', 'n', 'i', 'k', 'a'} |
uint8_t | dev_type |
uint8_t | receive_buffer [255] |
uint8_t | msg_flag = 0 |
char * | ptr |
Rn4870 Click example.
This example reads and processes data from RN4870 clicks.
The demo application is composed of two sections :
Initializes UART driver. Initializes device and parser.
If 'MASTER' - connects to 'SLAVE', sends message and disconnects. If 'SLAVE' - waits for connect request and message from 'MASTER' and LOGs received message.
#define DEMO_APP_TRANSMITER |
#define PROCESS_COUNTER 10 |
#define PROCESS_PARSER_BUFFER_SIZE 500 |
#define PROCESS_RX_BUFFER_SIZE 500 |
void application_init | ( | void | ) |
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |
uint8_t dev_type |
uint8_t message_payload[17] = {'M', 'i', 'k', 'r', 'o', 'E', 'l', 'e', 'k', 't', 'r', 'o', 'n', 'i', 'k', 'a'} |
uint8_t msg_flag = 0 |
char* ptr |
uint8_t receive_buffer[255] |
uint8_t RN4870_ADDR_MASTER[13] = {'D', 'F', '0', '0', '0', '0', '0', '6', '8', '7', '9', '0'} |
uint8_t RN4870_ADDR_SLAVE[13] = {'D', 'F', '1', '1', '1', '1', '1', '6', '8', '7', '9', '0'} |