zigbee 2.0.0.0
main.c File Reference

ZigBee Click Example. More...

#include "board.h"
#include "log.h"
#include "zigbee.h"

Functions

void zigbee_clear_app_buf (void)
 ZigBee clearing application buffer.
 
void resp_wait (zigbee_t *ctx)
 ZigBee wait response.
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

uint8_t dev_mode
 
uint8_t app_mode
 
char AT_BCAST_MSG [15] = ":00,MikroE"
 
char AT_HOST_CFG1 [10] = "00=6314"
 
char AT_HOST_CFG2 [20] = "0A=0914;password"
 
char AT_HOST_CFG3 [50] = "09=5A6967426565416C6C69616E63653039;password"
 

Detailed Description

ZigBee Click Example.

Description

This is an example that demonstrates the use of the ZigBee Click board.

The demo application is composed of two sections :

Application Init

Initialization of driver, UART ISR and then configures device. Depending on previous selected device mode it creates new PAN network or joins to one.

Application Task

Host mode: Broadcasts message 'MikroE' every 3 seconds. User mode: Checks if something is received.

Additional Function

  • void zigbee_clear_app_buf ( void ) - Clearing application buffer function.
  • void resp_wait ( zigbee_t *ctx ) - Function for waiting for complete response.
Author
Stefan Ilic

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 )

◆ resp_wait()

void resp_wait ( zigbee_t * ctx)

ZigBee wait response.

This function is used for waiting for complete response.

◆ zigbee_clear_app_buf()

void zigbee_clear_app_buf ( void )

ZigBee clearing application buffer.

This function clears memory of application buffer and reset it's length and counter.

Variable Documentation

◆ app_mode

uint8_t app_mode

◆ AT_BCAST_MSG

char AT_BCAST_MSG[15] = ":00,MikroE"

◆ AT_HOST_CFG1

char AT_HOST_CFG1[10] = "00=6314"

◆ AT_HOST_CFG2

char AT_HOST_CFG2[20] = "0A=0914;password"

◆ AT_HOST_CFG3

char AT_HOST_CFG3[50] = "09=5A6967426565416C6C69616E63653039;password"

◆ dev_mode

uint8_t dev_mode