thyonei  2.1.0.0
Macros | Functions
main.c File Reference

Thyone-I Click Example. More...

#include "board.h"
#include "log.h"
#include "thyonei.h"

Macros

#define APP_BUFFER_SIZE   500
 
#define PROCESS_BUFFER_SIZE   200
 
#define TRANSMITTER_MAC_ADDRESS   0x6C000001ul
 Thyone-I MAC addresses. More...
 
#define RECEIVER_MAC_ADDRESS   0x6C000002ul
 
#define MAC_GROUP_ADDRESS   0xAA
 
#define SOURCE_ADDRESS
 
#define DESTINATION_ADDRESS   RECEIVER_MAC_ADDRESS
 
#define MESSAGE   "Thyone-I Click Ecample "
 Thyone-I Message. More...
 
#define BROADCAST_MESSAGE   "Broadcast"
 
#define MULTICAST_MESSAGE   "Multicast"
 
#define UNICAST_MESSAGE   "Unicast"
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Thyone-I Click Example.

Description

This example demonstrates the use of the Thyone-I Click board by sending and receiving data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the Click default configuration and setting the MAC addresses and mode.

Application Task

Transmitter mode - Sending data to the devices within range ( thyonei_broadcast_data_req ), with same MAC group ( thyonei_multicast_data_req ) and with the selected MAC destination address ( thyonei_unicast_data_req ). Receiver mode - Reads and processes all incoming data and displays them on the USB UART.

Additional Function

Author
Stefan Ilic

Macro Definition Documentation

◆ APP_BUFFER_SIZE

#define APP_BUFFER_SIZE   500

◆ BROADCAST_MESSAGE

#define BROADCAST_MESSAGE   "Broadcast"

◆ DESTINATION_ADDRESS

#define DESTINATION_ADDRESS   RECEIVER_MAC_ADDRESS

◆ MAC_GROUP_ADDRESS

#define MAC_GROUP_ADDRESS   0xAA

◆ MESSAGE

#define MESSAGE   "Thyone-I Click Ecample "

Thyone-I Message.

Specified message to be sent to receivers of Thyone-I Click driver.

◆ MULTICAST_MESSAGE

#define MULTICAST_MESSAGE   "Multicast"

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   200

◆ RECEIVER_MAC_ADDRESS

#define RECEIVER_MAC_ADDRESS   0x6C000002ul

◆ SOURCE_ADDRESS

#define SOURCE_ADDRESS
Value:
TRANSMITTER_MAC_ADDRESS /* Change the value of this macro to change
between transmitter and receiver mode */

◆ TRANSMITTER_MAC_ADDRESS

#define TRANSMITTER_MAC_ADDRESS   0x6C000001ul

Thyone-I MAC addresses.

Specified setting for MAC addresses of Thyone-I Click driver.

◆ UNICAST_MESSAGE

#define UNICAST_MESSAGE   "Unicast"

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void  )

◆ main()

int main ( void  )
TRANSMITTER_MAC_ADDRESS
#define TRANSMITTER_MAC_ADDRESS
Thyone-I MAC addresses.
Definition: main.c:37