nfc7i2c 2.1.0.0
Loading...
Searching...
No Matches
main.c File Reference

NFC 7 I2C Click example. More...

#include "board.h"
#include "log.h"
#include "nfc7i2c.h"

Macros

#define BLK_NB_ISO14443_3A   32
 
#define DATA_WRITE_ISO14443_3A   0x11, 0x22, 0x33, 0x44
 
#define BLK_NB_ISO15693   32
 
#define DATA_WRITE_ISO15693   0x11, 0x22, 0x33, 0x44
 
#define BLK_NB_MFC   32
 
#define KEY_MFC   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
 
#define DATA_WRITE_MFC   0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
 

Functions

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

Detailed Description

NFC 7 I2C Click example.

Description

This example demonstrates the use of NFC 7 I2C Click board by handling the detection and processing of various NFC technologies and protocols, and ensuring the application can respond to different NFC card types (A,B,F,V).

The demo application is composed of two sections :

Application Init

Initializes the driver and logger, performs the Click default configuration and reads the device firmware version.

Application Task

Waits for an NFC device to be discovered, checks if it supports a known NFC technology, and then handles the device based on its protocol. The application continues processing the device (reading and writing information) and waits until the card is removed. Once the card is removed, the discovery process is restarted to detect a new NFC device.

Author
Stefan Filipovic

Macro Definition Documentation

◆ BLK_NB_ISO14443_3A

#define BLK_NB_ISO14443_3A   32

◆ BLK_NB_ISO15693

#define BLK_NB_ISO15693   32

◆ BLK_NB_MFC

#define BLK_NB_MFC   32

◆ DATA_WRITE_ISO14443_3A

#define DATA_WRITE_ISO14443_3A   0x11, 0x22, 0x33, 0x44

◆ DATA_WRITE_ISO15693

#define DATA_WRITE_ISO15693   0x11, 0x22, 0x33, 0x44

◆ DATA_WRITE_MFC

#define DATA_WRITE_MFC   0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF

◆ KEY_MFC

#define KEY_MFC   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF

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 )