lr10 2.1.0.0
main.c File Reference

LR 10 Click Example. More...

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

Macros

#define DEMO_APP_TRANSMITTER
 
#define PROCESS_BUFFER_SIZE   200
 
#define PROCESS_RF_CFG_DEFAULT   "868,SF7,125,8,8,14,ON,OFF,OFF"
 
#define LR10_DEMO_STRING   "MikroE - LR 10 Click"
 

Functions

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

Detailed Description

LR 10 Click Example.

Description

This example demonstrates the use of LR 10 click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs a hardware reset of the device.

Application Task

Depending on the selected mode, the application demo receives and processes all incoming data or sends the LoRa packet demo string. Results are being sent to the UART Terminal, where you can track their changes.

Additional Function

  • static void lr10_clear_app_buf ( void )
  • static void lr10_log_app_buf ( void )
  • static void lr10_log_receiver ( void )
  • static err_t lr10_process ( lr10_t *ctx )
Author
Nenad Filipovic

Macro Definition Documentation

◆ DEMO_APP_TRANSMITTER

#define DEMO_APP_TRANSMITTER

◆ LR10_DEMO_STRING

#define LR10_DEMO_STRING   "MikroE - LR 10 Click"

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   200

◆ PROCESS_RF_CFG_DEFAULT

#define PROCESS_RF_CFG_DEFAULT   "868,SF7,125,8,8,14,ON,OFF,OFF"

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 )