ismrx  2.0.0.0
Macros | Functions
main.c File Reference

ISMRX Click example. More...

#include "board.h"
#include "log.h"
#include "ismrx.h"

Macros

#define SINGLE_MAN_MIN   2
 
#define SINGLE_MAN_MAX   4
 
#define DUAL_MAN_MAX   7
 
#define BUFFER_SIZE   800
 
#define MAN_BUF_SIZE   800
 
#define BIT_BUF_SIZE   400
 
#define DATA_BUF_SIZE   50
 
#define ASK_PREAMBLE_STRING   "0101010101010101"
 
#define FSK_PREAMBLE_STRING   "010101010101"
 

Functions

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

Detailed Description

ISMRX Click example.

Description

This application shows capability of ISM RX Click board. It sets default configuration, and collects and processes data from signal that received from ISM TX Click board. It can collect and process data from 2 type of the signal modulation( FSK and ASK ).

The demo application is composed of two sections :

Application Init

Initialization of log and communication, set's signal modulation(FSK/ASK), recive mode(continuous/discontinuous), default configuration for selected modulation, and reinitializes device for receiving mode.

Application Task

Collects samples of data from data line(MISO) when buffer is full converts samples to manchester encoded data, and checks for preamble(sync) data. If data is valid decodes data and converts bit's to valid data and logs result of received decoded data.

Additional Function

note: Macros for checking sample data and delay in application_task can be prone to change depending of speed of MCU.

Author
Luka Filipovic

Macro Definition Documentation

◆ ASK_PREAMBLE_STRING

#define ASK_PREAMBLE_STRING   "0101010101010101"

◆ BIT_BUF_SIZE

#define BIT_BUF_SIZE   400

◆ BUFFER_SIZE

#define BUFFER_SIZE   800

◆ DATA_BUF_SIZE

#define DATA_BUF_SIZE   50

◆ DUAL_MAN_MAX

#define DUAL_MAN_MAX   7

◆ FSK_PREAMBLE_STRING

#define FSK_PREAMBLE_STRING   "010101010101"

◆ MAN_BUF_SIZE

#define MAN_BUF_SIZE   800

◆ SINGLE_MAN_MAX

#define SINGLE_MAN_MAX   4

◆ SINGLE_MAN_MIN

#define SINGLE_MAN_MIN   2

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()

void main ( void  )