nfc 2.1.0.0
main.c File Reference

NFC Click example. More...

#include "board.h"
#include "log.h"
#include "nfc.h"

Functions

void display_packet (control_packet_t *ctrl_pck)
 NFC display packet function.
 
void nfc_print_info (control_packet_t *ctrl_pck)
 NFC display tag info.
 
void display_nfc_data (control_packet_t *ctrl_pck)
 NFC display nfc data function.
 
void nfc_read_nfc_data (nfc_t *ctx, control_packet_t *ctrl_pck)
 NFC read nfc data function.
 
void nfc_test_antenna (nfc_t *ctx, control_packet_t *ctrl_pck)
 NFC test antena function.
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

uint8_t n_cnt
 
control_packet_t ctrl_pck_data
 

Detailed Description

NFC Click example.

Description

This is an example which demonstrates the usage of NFC Click board.

The demo application is composed of two sections :

Application Init

Initializes driver and logger, then performs hardware reset, puts the device in operating mode by disabling standby mode, performs test procedure, and configures the device to start discovery.

Application Task

NFC Click board can be used for detection of RFiD tag and displays it's value via USART terminal. All data logs write on USB uart changes for every 1 sec.

Additional Functions : -void display_packet ( control_packet_t *ctrl_pck ) - Display packet log data. -void display_nfc_data ( control_packet_t *ctrl_pck ) - Display packet log data. -void nfc_read_nfc_data ( nfc_t *ctx, control_packet_t *ctrl_pck ) - Read nfc data function. -void nfc_test_antenna ( nfc_t *ctx, control_packet_t *ctrl_pck ) - Testing Antenna function.

Author
Stefan Ilic

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 )

◆ display_nfc_data()

void display_nfc_data ( control_packet_t * ctrl_pck)

NFC display nfc data function.

This function displays nfc data values.

◆ display_packet()

void display_packet ( control_packet_t * ctrl_pck)

NFC display packet function.

This function displays data values.

◆ main()

int main ( void )

◆ nfc_print_info()

void nfc_print_info ( control_packet_t * ctrl_pck)

NFC display tag info.

This function displays tag info data.

◆ nfc_read_nfc_data()

void nfc_read_nfc_data ( nfc_t * ctx,
control_packet_t * ctrl_pck )

NFC read nfc data function.

This function reads nfc data and displays data.

◆ nfc_test_antenna()

void nfc_test_antenna ( nfc_t * ctx,
control_packet_t * ctrl_pck )

NFC test antena function.

This function tests antenna and displays data.

Variable Documentation

◆ ctrl_pck_data

control_packet_t ctrl_pck_data

◆ n_cnt

uint8_t n_cnt