X_NUCLEO_NFC02A1 library for M24LR

Dependencies:   ST_INTERFACES

Dependents:   HelloWorld_NFC02A1_mbedOS HelloWorld_NFC02A1laatste HelloWorld_NFC02A1

Fork of X_NUCLEO_NFC02A1 by ST Expansion SW Team

Embed: (wiki syntax)

« Back to documentation index

M24LR_Exported_Constants

M24LR_Exported_Constants

Data Structures

struct  M24LR_Mem_Size
 M24LR Memory information structure definition. More...
struct  M24LR_Lock_Sectors
 M24LR I2C Write Lock register structure definition. More...
struct  M24LR_UID
 M24LR UID information structure definition. More...
struct  M24LR_SECTOR_SEC
 M24LR Sector Security register structure definition. More...
class  M24LR
 M24LR class. More...

Enumerations

enum  NFCTAG_StatusTypeDef
 

NFCTAG status enumerator definition.

More...
enum  M24LR_EH_CFG_VOUT
 

M24LR VOUT Configuration enumerator definition.

More...
enum  M24LR_FIELD_STATUS
 

M24LR FIELD status enumerator definition.

More...
enum  M24LR_T_PROG_STATUS
 

M24LR TT-PROG status enumerator definition.

More...
enum  M24LR_EH_STATUS
 

M24LR Energy Harvesting status enumerator definition.

More...
enum  M24LR_EH_MODE_STATUS
 

M24LR Energy Harvesting mode enumerator definition.

More...
enum  M24LR_GPO_STATUS
 

M24LR GPO status enumerator definition.

More...

Functions

NFCTAG_StatusTypeDef i2c_read_id (uint8_t *const pICRef)
 Read M24LR ID.
NFCTAG_StatusTypeDef i2c_is_device_ready (const uint32_t Trials)
 Check M24LR availability.
NFCTAG_StatusTypeDef i2c_configure_GPO (const uint16_t ITConf)
 Configure M24LR GPO.
NFCTAG_StatusTypeDef i2c_get_GPO_status (uint16_t *const pGPOStatus)
 Get Configuration of M24LR GPO.
NFCTAG_StatusTypeDef i2c_read_data (uint8_t *const pData, const uint16_t TarAddr, const uint16_t NbByte)
 Read N bytes starting from specified I2C address.
NFCTAG_StatusTypeDef i2c_write_data (const uint8_t *const pData, const uint16_t TarAddr, const uint16_t NbByte)
 Write N data bytes starting from specified I2C Address.
NFCTAG_StatusTypeDef i2c_read_register (uint8_t *const pData, const uint16_t TarAddr, const uint16_t NbByte)
 Read N register bytes starting from specified I2C address.
NFCTAG_StatusTypeDef i2c_write_register (const uint8_t *const pData, const uint16_t TarAddr, const uint16_t NbByte)
 Write N bytes to specific register.
NFCTAG_StatusTypeDef i2c_read_UID (M24LR_UID *const pUid)
 Read M24LR UID.
NFCTAG_StatusTypeDef i2c_read_DSFID (uint8_t *const pDsfid)
 Read DSFID.
NFCTAG_StatusTypeDef i2c_read_AFI (uint8_t *const pAfi)
 Read AFI.
NFCTAG_StatusTypeDef i2c_read_I2C_lock_sector (M24LR_Lock_Sectors *const pLock_sector)
 Read status of I2C Lock Sectors.
NFCTAG_StatusTypeDef i2c_I2C_lock_sector (const uint8_t Sector)
 Lock I2C write on an EEPROM Sectors.
NFCTAG_StatusTypeDef i2c_I2C_unlock_sector (const uint8_t Sector)
 UnLock I2C write on a EEPROM Sector.
NFCTAG_StatusTypeDef i2c_present_I2C_password (const uint32_t PassWord)
 Present I2C password, authorize I2C write.
NFCTAG_StatusTypeDef i2c_write_I2C_password (const uint32_t PassWord)
 Write new I2C password.
NFCTAG_StatusTypeDef i2c_read_SSSx (const uint8_t SectorNb, M24LR_SECTOR_SEC *const pData)
 Read SectorSecurityStatus (defining RF access allowed)
NFCTAG_StatusTypeDef i2c_write_SSSx (const uint8_t SectorNb, const M24LR_SECTOR_SEC *const pData)
 Write SectorSecurityStatus (defining RF access allowed)
NFCTAG_StatusTypeDef i2c_read_mem_size (M24LR_Mem_Size *const pSizeInfo)
 Read Memory Size info.
NFCTAG_StatusTypeDef i2c_get_RF_WIP_busy (M24LR_GPO_STATUS *const pRf_Wip_Busy)
 Get GPO Configuration status.
NFCTAG_StatusTypeDef i2c_setRF_Busy (void)
 Configure GPO as RF Busy.
NFCTAG_StatusTypeDef i2c_set_RF_WIP (void)
 Configure GPO as RF WriteInProgress.
NFCTAG_StatusTypeDef i2c_read_EH_mode (M24LR_EH_MODE_STATUS *const pEH_mode)
 Get Energy harvesting mode status.
NFCTAG_StatusTypeDef i2c_enable_EH_mode (void)
 Enable Energy harvesting mode.
NFCTAG_StatusTypeDef i2c_disable_EH_mode (void)
 Disable Energy harvesting mode.
NFCTAG_StatusTypeDef i2c_read_EH_cfg (M24LR_EH_CFG_VOUT *const pEH_Cfg)
 Read Vout sink current configuration status for Energy Harvesting.
NFCTAG_StatusTypeDef i2c_write_EH_cfg (const M24LR_EH_CFG_VOUT EH_Cfg)
 Write Vout sink current configuration status for Energy Harvesting.
NFCTAG_StatusTypeDef i2c_get_EH (M24LR_EH_STATUS *const pEH_Val)
 Get Energy Harvesting status.
NFCTAG_StatusTypeDef i2c_set_EH (void)
 Enable Energy Harvesting.
NFCTAG_StatusTypeDef i2c_reset_EH (void)
 Disable Energy Harvesting.
NFCTAG_StatusTypeDef i2c_get_RF_field (M24LR_FIELD_STATUS *const pRF_Field)
 Check if RF Field is present in front of M24LR.
NFCTAG_StatusTypeDef i2c_get_TProg (M24LR_T_PROG_STATUS *const pT_Prog)
 Check if Write Timing is good.
void enable_energy_harvesting (void)
 Activate Energy Harvesting mode.
NFCTAG_StatusTypeDef initialization (void)
 Set M24LR nfctag Initialization.

Enumeration Type Documentation

M24LR VOUT Configuration enumerator definition.

Definition at line 111 of file M24LR.h.

M24LR Energy Harvesting mode enumerator definition.

Definition at line 149 of file M24LR.h.

M24LR Energy Harvesting status enumerator definition.

Definition at line 140 of file M24LR.h.

M24LR FIELD status enumerator definition.

Definition at line 122 of file M24LR.h.

M24LR GPO status enumerator definition.

Definition at line 158 of file M24LR.h.

M24LR TT-PROG status enumerator definition.

Definition at line 131 of file M24LR.h.

NFCTAG status enumerator definition.

Definition at line 100 of file M24LR.h.


Function Documentation

void enable_energy_harvesting ( void   ) [inherited]

Activate Energy Harvesting mode.

Definition at line 45 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_configure_GPO ( const uint16_t  ITConf ) [inherited]

Configure M24LR GPO.

Parameters:
ITConf: 0x01 = RFBUSY, 0x02 = RFWIP
Return values:
NFCTAGenum status

Definition at line 149 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_disable_EH_mode ( void   ) [inherited]

Disable Energy harvesting mode.

Parameters:
None
Return values:
NFCTAGenum status

Definition at line 742 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_enable_EH_mode ( void   ) [inherited]

Enable Energy harvesting mode.

Parameters:
None
Return values:
NFCTAGenum status

Definition at line 719 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_get_EH ( M24LR_EH_STATUS *const   pEH_Val ) [inherited]

Get Energy Harvesting status.

Parameters:
EH_Val: M24LR_EH_STATUS pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 832 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_get_GPO_status ( uint16_t *const   pGPOStatus ) [inherited]

Get Configuration of M24LR GPO.

Parameters:
GPOStatus: 0x01 = RFBUSY, 0x02 = RFWIP
Return values:
NFCTAGenum status

Definition at line 189 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_get_RF_field ( M24LR_FIELD_STATUS *const   pRF_Field ) [inherited]

Check if RF Field is present in front of M24LR.

Parameters:
pRF_Field: M24LR_FIELD_STATUS pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 904 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_get_RF_WIP_busy ( M24LR_GPO_STATUS *const   pRf_Wip_Busy ) [inherited]

Get GPO Configuration status.

Parameters:
Rf_Wip_Busy: M24LR_GPO_STATUS pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 639 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_get_TProg ( M24LR_T_PROG_STATUS *const   pT_Prog ) [inherited]

Check if Write Timing is good.

Parameters:
pT_Prog: M24LR_T_PROG_STATUS pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 931 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_I2C_lock_sector ( const uint8_t  Sector ) [inherited]

Lock I2C write on an EEPROM Sectors.

Need a presentation of I2C Password to be effective

Parameters:
Sector: EEPROM Sector number to lock (between 0 to 63)
Return values:
NFCTAGenum status

Definition at line 460 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_I2C_unlock_sector ( const uint8_t  Sector ) [inherited]

UnLock I2C write on a EEPROM Sector.

Need an presentation of I2C Password to be effective

Parameters:
pSector: EEPROM Sector number to unlock (between 0 to 63)
Return values:
NFCTAGenum status

Definition at line 488 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_is_device_ready ( const uint32_t  Trials ) [inherited]

Check M24LR availability.

Parameters:
Trials: number of max tentative tried
Return values:
NFCTAGenum status

Definition at line 127 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_present_I2C_password ( const uint32_t  PassWord ) [inherited]

Present I2C password, authorize I2C write.

Parameters:
PassWord: Password value on 32bits
Return values:
NFCTAGenum status

Definition at line 515 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_AFI ( uint8_t *const   pAfi ) [inherited]

Read AFI.

Parameters:
pData: pointer of the AFI to store
Return values:
NFCTAGenum status

Definition at line 419 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_data ( uint8_t *const   pData,
const uint16_t  TarAddr,
const uint16_t  NbByte 
) [inherited]

Read N bytes starting from specified I2C address.

Parameters:
pData: pointer of the data to store
TarAddr: I2C data memory address to read
NbByte: number of bytes to read
Return values:
NFCTAGenum status

Definition at line 217 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_DSFID ( uint8_t *const   pDsfid ) [inherited]

Read DSFID.

Parameters:
pData: pointer of the DSFID to store
Return values:
NFCTAGenum status

Definition at line 408 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_EH_cfg ( M24LR_EH_CFG_VOUT *const   pEH_Cfg ) [inherited]

Read Vout sink current configuration status for Energy Harvesting.

Parameters:
EH_Cfg: M24LR_EH_CFG_VOUT pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 765 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_EH_mode ( M24LR_EH_MODE_STATUS *const   pEH_mode ) [inherited]

Get Energy harvesting mode status.

Parameters:
EH_mode: M24LR_EH_MODE_STATUS pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 693 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_I2C_lock_sector ( M24LR_Lock_Sectors *const   pLock_sector ) [inherited]

Read status of I2C Lock Sectors.

Parameters:
Lock_sector: M24LR_Lock_Sectors pointer of the I2c lock sector status to store
Return values:
NFCTAGenum status

Definition at line 430 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_id ( uint8_t *const   pData ) [inherited]

Read M24LR ID.

Parameters:
pICRef: pointer to store ID
Return values:
NFCTAGenum status

Definition at line 106 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_mem_size ( M24LR_Mem_Size *const   pSizeInfo ) [inherited]

Read Memory Size info.

Parameters:
SizeInfo: M24LR_Mem_Size pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 615 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_register ( uint8_t *const   pData,
const uint16_t  TarAddr,
const uint16_t  NbByte 
) [inherited]

Read N register bytes starting from specified I2C address.

Parameters:
pData: pointer of the data to store
TarAddr: I2C memory address to read
NbByte: number of bytes to read
Return values:
NFCTAGenum status

Definition at line 297 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_SSSx ( const uint8_t  SectorNb,
M24LR_SECTOR_SEC *const   pData 
) [inherited]

Read SectorSecurityStatus (defining RF access allowed)

Parameters:
SectorNb: Sector number to get RF security status
pData: M24LR_SECTOR_SEC pointer of the data to store
Return values:
NFCTAGenum status

Definition at line 563 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_read_UID ( M24LR_UID *const   pUid ) [inherited]

Read M24LR UID.

Parameters:
UID: M24LR_UID pointer of the UID to store
Return values:
NFCTAGenum status

Definition at line 375 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_reset_EH ( void   ) [inherited]

Disable Energy Harvesting.

Parameters:
None
Return values:
NFCTAGenum status

Definition at line 881 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_set_EH ( void   ) [inherited]

Enable Energy Harvesting.

Parameters:
None
Return values:
NFCTAGenum status

Definition at line 858 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_set_RF_WIP ( void   ) [inherited]

Configure GPO as RF WriteInProgress.

Parameters:
None
Return values:
NFCTAGenum status

Definition at line 167 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_setRF_Busy ( void   ) [inherited]

Configure GPO as RF Busy.

Parameters:
None
Return values:
NFCTAGenum status

Definition at line 665 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_write_data ( const uint8_t *const   pData,
const uint16_t  TarAddr,
const uint16_t  NbByte 
) [inherited]

Write N data bytes starting from specified I2C Address.

if I2C_Write_Lock bit = 0 or I2C_Password present => ack (modification OK) if I2C_Write_Lock bit = 1 and no I2C_Password present => No ack (no modification)

Parameters:
pData: pointer of the data to write
TarAddr: I2C data memory address to write
NbByte: number of bytes to write
Return values:
NFCTAGenum status

Definition at line 243 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_write_EH_cfg ( const M24LR_EH_CFG_VOUT  EH_Cfg ) [inherited]

Write Vout sink current configuration status for Energy Harvesting.

Parameters:
EH_Cfg: M24LR_EH_CFG_VOUT value to configure Vout
Return values:
NFCTAGenum status

Definition at line 808 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_write_I2C_password ( const uint32_t  PassWord ) [inherited]

Write new I2C password.

Need to present good I2CPassword before using this function

Parameters:
PassWord: new I2C PassWord value on 32bits
Return values:
NFCTAGenum status

Definition at line 539 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_write_register ( const uint8_t *const   pData,
const uint16_t  TarAddr,
const uint16_t  NbByte 
) [inherited]

Write N bytes to specific register.

Parameters:
pData: pointer of the data to write
TarAddr: I2C register address to write
NbByte: number of bytes to write
Return values:
NFCTAGenum status

Definition at line 324 of file M24LR.cpp.

NFCTAG_StatusTypeDef i2c_write_SSSx ( const uint8_t  SectorNb,
const M24LR_SECTOR_SEC *const   pData 
) [inherited]

Write SectorSecurityStatus (defining RF access allowed)

Need an presentation of I2C Password to be effective

Parameters:
SectorNb: Sector number to set RF security
pData: M24LR_SECTOR_SEC pointer of the data to write
Return values:
NFCTAGenum status

Definition at line 593 of file M24LR.cpp.

NFCTAG_StatusTypeDef initialization ( void   ) [inherited]

Set M24LR nfctag Initialization.

Parameters:
None
Return values:
NFCTAGenum status

Definition at line 62 of file M24LR.cpp.