ismrx 2.0.0.0
main.c File Reference

ISMRX Click example. More...

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

Macros

#define MAN_BUF_SIZE   300
 
#define DATA_BUF_SIZE   50
 
#define PREAMBLE_STRING   "0101010101010101"
 

Functions

void application_init (void)
 
void application_task (void)
 
int 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 bits to valid data and logs result of received decoded data.

Additional Function

  • static void clear_buffers ( void )
  • static void wait_for_data ( void )
  • static void man_to_hex_array ( void )
Author
Luka Filipovic

Macro Definition Documentation

◆ DATA_BUF_SIZE

#define DATA_BUF_SIZE   50

◆ MAN_BUF_SIZE

#define MAN_BUF_SIZE   300

◆ PREAMBLE_STRING

#define PREAMBLE_STRING   "0101010101010101"

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 )