 c00776ca22
			
		
	
	
		c00776ca22
		
			
		
	
	
	
	
		
			
			* drivers: expose st25r3916 driver API * nfc poller: add start with custom callback * mf classic: rework sync API with poller custom start * mf ultralight: rework sync API with poller custom start * iso14443_3a poller: remove unused col res state * nfc: rework nfc poller custom start * mf ultralight: rename sync API * mf classic: rename sync API * iso14443-3a: rename sync API * nfc: remove async prefix in internal functions * nfc: expose internal API * nfc: fix sync api include and docs * targets: fix f18 build * nfc: rework NfcGenericEventEx type * nfc poller: add documentation * iso14443-3a poller: add documentation * felica poller: add documentation * iso14443_3b poller: add documentation * so14443_4a poller: add documentation * iso14443_4b poller: add documentation * iso15693 poller: add documentation * slix poller: add documentation * mf desfire poller: add documentation * mf ultralight poller: fix API and add documentation * mf classic poller: add documentation Co-authored-by: あく <alleteam@gmail.com>
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include "felica.h"
 | |
| #include <lib/nfc/nfc.h>
 | |
| 
 | |
| #include <nfc/nfc_poller.h>
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| /**
 | |
|  * @brief FelicaPoller opaque type definition.
 | |
|  */
 | |
| typedef struct FelicaPoller FelicaPoller;
 | |
| 
 | |
| /**
 | |
|  * @brief Enumeration of possible Felica poller event types.
 | |
|  */
 | |
| typedef enum {
 | |
|     FelicaPollerEventTypeError, /**< The card was activated by the poller. */
 | |
|     FelicaPollerEventTypeReady, /**< An error occured during activation procedure. */
 | |
| } FelicaPollerEventType;
 | |
| 
 | |
| /**
 | |
|  * @brief Felica poller event data.
 | |
|  */
 | |
| typedef union {
 | |
|     FelicaError error; /**< Error code indicating card activation fail reason. */
 | |
| } FelicaPollerEventData;
 | |
| 
 | |
| /**
 | |
|  * @brief FelicaPoller poller event structure.
 | |
|  *
 | |
|  * Upon emission of an event, an instance of this struct will be passed to the callback.
 | |
|  */
 | |
| typedef struct {
 | |
|     FelicaPollerEventType type; /**< Type of emmitted event. */
 | |
|     FelicaPollerEventData* data; /**< Pointer to event specific data. */
 | |
| } FelicaPollerEvent;
 | |
| 
 | |
| /**
 | |
|  * @brief Perform collision resolution procedure.
 | |
|  *
 | |
|  * Must ONLY be used inside the callback function.
 | |
|  *
 | |
|  * Perfoms the collision resolution procedure as defined in FeliCa standars. The data
 | |
|  * field will be filled with Felica data on success.
 | |
|  *
 | |
|  * @param[in, out] instance pointer to the instance to be used in the transaction.
 | |
|  * @param[out] data pointer to the Felica data structure to be filled.
 | |
|  * @return FelicaErrorNone on success, an error code on failure.
 | |
|  */
 | |
| FelicaError felica_poller_activate(FelicaPoller* instance, FelicaData* data);
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| }
 | |
| #endif
 |