enocean 2.0.0.0
main.c File Reference

Enocean Click example. More...

#include "board.h"
#include "log.h"
#include "enocean.h"
#include "string.h"

Functions

void make_response (enocean_packet_t *rsp, uint16_t *rsp_length_size)
 
void log_response ()
 
void log_example ()
 
void check_response ()
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

enocean_packet_t response
 
uint16_t response_size_cnt
 
uint8_t rsp_check = 1
 

Detailed Description

Enocean Click example.

Description

This example reads and processes data from EnOcean clicks.

The demo application is composed of two sections :

Application Init

Initializes the driver and sets the driver handler.

Application Task

Reads the received data and parses it on the USB UART if the response buffer is ready.

Additional Function

  • enocean_process - The general process of collecting data the module sends.
  • make_response - Driver handler function which stores data in the response buffer.
  • log_response - Logs the module response on the USB UART.
  • log_example - Logs button events on the USB UART.
  • check_response - Checks if the response is ready and logs button events.
Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

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 )

◆ check_response()

void check_response ( )

◆ log_example()

void log_example ( )

◆ log_response()

void log_response ( )

◆ main()

int main ( void )

◆ make_response()

void make_response ( enocean_packet_t * rsp,
uint16_t * rsp_length_size )

Variable Documentation

◆ response

enocean_packet_t response

◆ response_size_cnt

uint16_t response_size_cnt

◆ rsp_check

uint8_t rsp_check = 1