lr 2.1.0.0
main.c File Reference

LR Click Example. More...

#include "board.h"
#include "log.h"
#include "lr.h"
#include "conversions.h"

Macros

#define PROCESS_COUNTER   5
 
#define PROCESS_RX_BUFFER_SIZE   300
 
#define DEMO_APP_TRANSMITTER
 

Functions

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

Variables

char send_hex [50]
 
char resp_buf [50]
 
uint8_t send_message [9] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 }
 

Detailed Description

LR Click Example.

Description

This example shows the usage of the LR Click board by transmitting and receiving data.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs default configuration and reads System version.

Application Task

Transmitter mode - sends one-by-one byte sequence of the desired message each second and checks if it is sent successfully Receiver mode - displays all the received characters on USB UART.

Author
Stefan Ilic

Macro Definition Documentation

◆ DEMO_APP_TRANSMITTER

#define DEMO_APP_TRANSMITTER

◆ PROCESS_COUNTER

#define PROCESS_COUNTER   5

◆ PROCESS_RX_BUFFER_SIZE

#define PROCESS_RX_BUFFER_SIZE   300

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 )

Variable Documentation

◆ resp_buf

char resp_buf[50]

◆ send_hex

char send_hex[50]

◆ send_message

uint8_t send_message[9] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 }