wirepas 2.1.0.0
|
Wirepas Click Example. More...
Macros | |
#define | PROCESS_BUFFER_SIZE 200 |
#define | TX_DATA "Wirepas Click" |
#define | ROUTER_MODE |
#define | MULTI_SINK_MODE |
#define | TX_ADDRESS 0x01 |
Wirepas node addresses. More... | |
#define | RX_ADDRESS_1 0x02 |
#define | RX_ADDRESS_2 0x03 |
#define | NET_ADDRESS 0x01 |
#define | CHANNEL_ADDRESS 0x01 |
Functions | |
err_t | wirepas_get_resp (wirepas_t *ctx) |
Wirepas get responce function. More... | |
void | application_init (void) |
void | application_task (void) |
void | main (void) |
Variables | |
uint8_t | frame_id |
Wirepas Click Example.
This example demonstrates the use of Wirepas click board by processing the incoming data and displaying them on the USB UART in sink mode, and sending data to the sinks in router mode.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration, setting device mode, node, net and chennel addresses, and starting stack.
Router mode - Sending data to the sinks at the same network. Sink mode - Reads and processes all incoming data and displays them on the USB UART.
#define CHANNEL_ADDRESS 0x01 |
#define MULTI_SINK_MODE |
#define NET_ADDRESS 0x01 |
#define PROCESS_BUFFER_SIZE 200 |
#define ROUTER_MODE |
#define RX_ADDRESS_1 0x02 |
#define RX_ADDRESS_2 0x03 |
#define TX_ADDRESS 0x01 |
Wirepas node addresses.
Specified setting for node addresses of Wirepas Click driver.
#define TX_DATA "Wirepas Click" |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
void main | ( | void | ) |
err_t wirepas_get_resp | ( | wirepas_t * | ctx | ) |
Wirepas get responce function.
This function is used to get responce from the device.
[in] | ctx | : Click context object. See wirepas_t object definition for detailed explanation. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t frame_id |