smartnfc 2.2.0
Loading...
Searching...
No Matches
main.c File Reference

Smart NFC Click Example. More...

#include "board.h"
#include "log.h"
#include "smartnfc.h"

Functions

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

Detailed Description

Smart NFC Click Example.

Description

This example demonstrates the use of the Smart NFC Click board for detecting and reading NFC tags. The application resets the NFC module, retrieves the firmware version, and continuously scans for nearby NFC tags, displaying their UID and type.

The demo application is composed of two sections:

Application Init

Initializes the logger and configures the Smart NFC Click board. It establishes UART communication, resets the NFC module, and retrieves the firmware version to verify proper operation.

Application Task

Continuously scans for NFC tags and retrieves their unique identifiers (UID). If tags are detected, it logs their type, parameters, and UID values. The process repeats at 1-second intervals.

Note
A proper 13.56 MHz PCB NFC antenna must be attached to the Click board module for optimal tag detection.
Author
Stefan Filipovic

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 )