rn4870  2.0.0.0
Macros | Functions | Variables
main.c File Reference

Rn4870 Click example. More...

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

Macros

#define PROCESS_COUNTER   10
 
#define PROCESS_RX_BUFFER_SIZE   500
 
#define PROCESS_PARSER_BUFFER_SIZE   1000
 
#define DEMO_APP_TRANSMITER
 

Functions

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

Variables

uint8_t dev_type
 
uint8_t receive_buffer [255]
 
uint8_t msg_flag = 0
 
char * log_text
 
uint8_t MESSAGE_DATA [9] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 }
 
uint8_t RECIVE_DATA [50]
 
uint8_t RN4870_ADDR_MASTER [13] = {'D', 'F', '0', '0', '0', '0', '0', '6', '8', '7', '9', '0'}
 
uint8_t RN4870_ADDR_SLAVE1 [13] = {'D', 'F', '1', '1', '1', '1', '1', '6', '8', '7', '9', '0'}
 
uint8_t RN4870_ADDR_SLAVE2 [13] = {'D', 'F', '2', '2', '2', '2', '2', '6', '8', '7', '9', '0'}
 

Detailed Description

Rn4870 Click example.

Description

This example reads and processes data from RN4870 clicks.

The demo application is composed of two sections :

Application Init

Initialization driver enables - UART, also write log.

Application Task

This is an example which demonstrates the use of RN4870 Click board. If 'MASTER' - connects to 'SLAVE', sends message and disconnects. If 'SLAVE' - waits for connect request and message from 'MASTER' and LOGs received message. Results are being sent to the Usart Terminal where you can track their changes.

Additional Function

Author
MikroE Team

Macro Definition Documentation

◆ DEMO_APP_TRANSMITER

#define DEMO_APP_TRANSMITER

◆ PROCESS_COUNTER

#define PROCESS_COUNTER   10

◆ PROCESS_PARSER_BUFFER_SIZE

#define PROCESS_PARSER_BUFFER_SIZE   1000

◆ PROCESS_RX_BUFFER_SIZE

#define PROCESS_RX_BUFFER_SIZE   500

Function Documentation

◆ application_init()

void application_init ( void  )

◆ application_task()

void application_task ( void  )

◆ main()

void main ( void  )

Variable Documentation

◆ dev_type

uint8_t dev_type

◆ log_text

char* log_text

◆ MESSAGE_DATA

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

◆ msg_flag

uint8_t msg_flag = 0

◆ receive_buffer

uint8_t receive_buffer[255]

◆ RECIVE_DATA

uint8_t RECIVE_DATA[50]

◆ RN4870_ADDR_MASTER

uint8_t RN4870_ADDR_MASTER[13] = {'D', 'F', '0', '0', '0', '0', '0', '6', '8', '7', '9', '0'}

◆ RN4870_ADDR_SLAVE1

uint8_t RN4870_ADDR_SLAVE1[13] = {'D', 'F', '1', '1', '1', '1', '1', '6', '8', '7', '9', '0'}

◆ RN4870_ADDR_SLAVE2

uint8_t RN4870_ADDR_SLAVE2[13] = {'D', 'F', '2', '2', '2', '2', '2', '6', '8', '7', '9', '0'}