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 | ROUTER_NODE_ADDRESS 0x01 |
Wirepas node addresses. More... | |
#define | SINK_1_NODE_ADDRESS 0x02 |
#define | SINK_2_NODE_ADDRESS 0x03 |
#define | NET_ADDRESS 0x01 |
#define | CHANNEL_ADDRESS 0x01 |
#define | NODE_ADDRESS |
Functions | |
err_t | wirepas_get_resp (wirepas_t *ctx) |
Wirepas get response function. More... | |
void | application_init (void) |
void | application_task (void) |
void | main (void) |
Variables | |
uint8_t | frame_id = 0 |
wirepas_sink_data | sink_1 |
wirepas_sink_data | sink_2 |
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 chanel 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 NODE_ADDRESS |
#define PROCESS_BUFFER_SIZE 200 |
#define ROUTER_MODE |
#define ROUTER_NODE_ADDRESS 0x01 |
Wirepas node addresses.
Specified setting for node addresses of Wirepas Click driver.
#define SINK_1_NODE_ADDRESS 0x02 |
#define SINK_2_NODE_ADDRESS 0x03 |
#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 response function.
This function is used to get response 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 = 0 |
wirepas_sink_data sink_1 |
wirepas_sink_data sink_2 |