Loading...
Searching...
No Matches
furi_hal_nfc_tech_i.h File Reference

NFC HAL technology-related private definitions. More...

#include <furi_hal_nfc.h>
#include <furi_hal_spi.h>

Go to the source code of this file.

Data Structures

struct  FuriHalNfcPollerCompensation
 Technology-specific compenstaion values for pollers. More...
 
struct  FuriHalNfcTechPollerBase
 Abstract technology-specific poller structure. More...
 
struct  FuriHalNfcListenerCompensation
 Technology-specific compenstaion values for listeners. More...
 
struct  FuriHalNfcTechListenerBase
 Abstract technology-specific listener structure. More...
 
struct  FuriHalNfcTechBase
 Abstract NFC technology definition structure. More...
 

Typedefs

typedef FuriHalNfcError(* FuriHalNfcChipConfig) (FuriHalSpiBusHandle *handle)
 Configure the NFC chip for use with this technology.
 
typedef FuriHalNfcError(* FuriHalNfcTx) (FuriHalSpiBusHandle *handle, const uint8_t *tx_data, size_t tx_bits)
 Transmit data using technology-specific framing and timings.
 
typedef FuriHalNfcError(* FuriHalNfcRx) (FuriHalSpiBusHandle *handle, uint8_t *rx_data, size_t rx_data_size, size_t *rx_bits)
 Receive data using technology-specific framing and timings.
 
typedef FuriHalNfcEvent(* FuriHalNfcWaitEvent) (uint32_t timeout_ms)
 Wait for an event using technology-specific method.
 
typedef FuriHalNfcError(* FuriHalNfcSleep) (FuriHalSpiBusHandle *handle)
 Go to sleep in listener mode.
 
typedef FuriHalNfcError(* FuriHalNfcIdle) (FuriHalSpiBusHandle *handle)
 Go to idle in listener mode.
 

Variables

const FuriHalNfcTechBase furi_hal_nfc_iso14443a
 Technology declaration for ISO14443 (Type A).
 
const FuriHalNfcTechBase furi_hal_nfc_iso14443b
 Technology declaration for ISO14443 (Type B).
 
const FuriHalNfcTechBase furi_hal_nfc_iso15693
 Technology declaration for ISO15693.
 
const FuriHalNfcTechBase furi_hal_nfc_felica
 Technology declaration for FeliCa.
 
const FuriHalNfcTechBasefuri_hal_nfc_tech []
 Array of pointers to every supported technology.
 

Detailed Description

NFC HAL technology-related private definitions.

This file is an implementation detail. It must not be included in any public API-related headers.

This file is to be changed in an unlikely event of adding support for a new NFC technology.

Typedef Documentation

◆ FuriHalNfcChipConfig

typedef FuriHalNfcError(* FuriHalNfcChipConfig) (FuriHalSpiBusHandle *handle)

Configure the NFC chip for use with this technology.

Used for init() and deinit() functions.

Parameters
[in,out]handlepointer to the NFC chip SPI handle.
Returns
FuriHalNfcErrorNone on success, any other error code on failure.

◆ FuriHalNfcIdle

typedef FuriHalNfcError(* FuriHalNfcIdle) (FuriHalSpiBusHandle *handle)

Go to idle in listener mode.

Puts the passive target logic into Sense (Idle) state.

Parameters
[in,out]handlepointer to the NFC chip SPI handle.
Returns
FuriHalNfcErrorNone on success, any other error code on failure.

◆ FuriHalNfcRx

typedef FuriHalNfcError(* FuriHalNfcRx) (FuriHalSpiBusHandle *handle, uint8_t *rx_data, size_t rx_data_size, size_t *rx_bits)

Receive data using technology-specific framing and timings.

Parameters
[in,out]handlepointer to the NFC chip SPI handle.
[out]rx_datapointer to a byte array to be filled with received data.
[in]rx_data_sizemaximum received data length, in bytes.
[out]rx_bitspointer to a variable to contain received data length, in bits.
Returns
FuriHalNfcErrorNone on success, any other error code on failure.

◆ FuriHalNfcSleep

typedef FuriHalNfcError(* FuriHalNfcSleep) (FuriHalSpiBusHandle *handle)

Go to sleep in listener mode.

Puts the passive target logic into Sleep (Halt) state.

Parameters
[in,out]handlepointer to the NFC chip SPI handle.
Returns
FuriHalNfcErrorNone on success, any other error code on failure.

◆ FuriHalNfcTx

typedef FuriHalNfcError( * FuriHalNfcTx) (FuriHalSpiBusHandle *handle, const uint8_t *tx_data, size_t tx_bits)

Transmit data using technology-specific framing and timings.

Parameters
[in,out]handlepointer to the NFC chip SPI handle.
[in]tx_datapointer to a byte array containing the data to be transmitted.
[in]tx_bitstransmit data size, in bits.
Returns
FuriHalNfcErrorNone on success, any other error code on failure.

◆ FuriHalNfcWaitEvent

typedef FuriHalNfcEvent(* FuriHalNfcWaitEvent) (uint32_t timeout_ms)

Wait for an event using technology-specific method.

Parameters
[in]timeout_msmaximum time to wait, in milliseconds.
Returns
bitmask of occurred events.

Variable Documentation

◆ furi_hal_nfc_tech

const FuriHalNfcTechBase* furi_hal_nfc_tech[]
extern

Array of pointers to every supported technology.

This variable is defined in furi_hal_nfc.c. It will need to be modified in case when a new technology is to be added.