Data Structures |
| class | Callbacks |
| | Object that contains all the callbacks fired by this class, each command has its own callback. More...
|
| struct | M24SR_command_data_t |
| | User parameter used to invoke a command, it is used to provide the data back with the response. More...
|
Public Types |
| enum | NFC_GPO_MGMT |
| | GPO state structure.
More...
|
| enum | PasswordType_t { ReadPwd,
WritePwd,
I2CPwd
} |
| | Possible password to set.
More...
|
| typedef void(* | gpoEventCallback )(void) |
| | Function that will be called when an interrupt is fired, this function must be set if you want use the component in async mode.
|
Public Member Functions |
| | M24SR (const uint8_t address, I2C &I2C, gpoEventCallback eventCallback, const PinName &GPOPinName, const PinName &RFDISPinName) |
| | Constructor.
|
| virtual | ~M24SR (void) |
| | Destructor.
|
| virtual int | init (void *ptr) |
| | This function initializes the M24SR device.
|
| virtual StatusTypeDef | get_session (void) |
| | lock the tag channel
|
| StatusTypeDef | force_get_session (void) |
| | Force to open an I2C connection , abort the RF connection.
|
| StatusTypeDef | select_application (void) |
| | Select the application file.
|
| StatusTypeDef | select_CC_file (void) |
| | Select the CC file.
|
| StatusTypeDef | select_NDEF_file (uint16_t NDEFfileId) |
| | Select the NDEF file.
|
| StatusTypeDef | select_system_file (void) |
| | Select the system file.
|
| StatusTypeDef | ST_read_binary (uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead) |
| | Same as NFC#read_binary, however permitting to read more bytes than available.
|
| StatusTypeDef | state_control (uint8_t uSetOrReset) |
| | Set the gpo output pin.
|
| StatusTypeDef | manage_I2C_GPO (NFC_GPO_MGMT GPO_I2Cconfig) |
| | This function configures GPO for I2C session.
|
| StatusTypeDef | manage_RF_GPO (uint8_t GPO_RFconfig) |
| | This function configures GPO for RF session.
|
| StatusTypeDef | RF_config (uint8_t OnOffChoice) |
| | This function enables or disables the RF communication.
|
| StatusTypeDef | send_interrupt (void) |
| | Generates a negative pulse on the GPO pin.
|
| StatusTypeDef | manage_event () |
| | Function to call when the component fire an interrupt.
|
| void | set_callback (Callbacks *commandCallback) |
| | Change the function to call when a command ends.
|
| StatusTypeDef | enable_read_password (const uint8_t *pCurrentWritePassword, const uint8_t *pNewPassword) |
| | Enable the request of a password before reading the tag.
|
| StatusTypeDef | disable_read_password (const uint8_t *pCurrentWritePassword) |
| | Disable the request of a password before reading the tag.
|
| StatusTypeDef | enable_write_password (const uint8_t *pCurrentWritePassword, uint8_t *pNewPassword) |
| | Enable the request of a password before writing to the tag.
|
| StatusTypeDef | disable_write_password (const uint8_t *pCurrentWritePassword) |
| | Disable the request of a password before writing the tag.
|
| StatusTypeDef | disable_all_password (const uint8_t *pSuperUserPassword) |
| | This function disables both read and write passwords.
|
| StatusTypeDef | enable_read_only (const uint8_t *pCurrentWritePassword) |
| | This function enables read only mode.
|
| StatusTypeDef | disable_read_only (const uint8_t *pCurrentWritePassword) |
| | This function disables read only mode.
|
| StatusTypeDef | enable_write_only (const uint8_t *pCurrentWritePassword) |
| | This function enables write only mode.
|
| StatusTypeDef | disable_write_only (const uint8_t *pCurrentWritePassword) |
| | This function disables write only mode.
|
| NDefLib::NDefNfcTag & | get_NDef_tag () |
| | Get an implementation of NDefNfcTag to use the library NDefLib.
|
Static Public Attributes |
| static const uint8_t | DEFAULT_PASSWORD [16] |
| | Default password used to change the write/read permission.
|
| static const NFC_GPO_MGMT | DEFAULT_GPO_STATUS = HIGH_IMPEDANCE |
| | Default gpo status -> the gpo will remain high.
|
Protected Types |
| enum | M24SR_command_t {
NONE,
DESELECT,
SELECT_APPLICATION,
SELECT_CC_FILE,
SELECT_NDEF_FILE,
SELECT_SYSTEM_FILE,
READ,
UPDATE,
VERIFY,
MANAGE_I2C_GPO,
MANAGE_RF_GPO,
CHANGE_REFERENCE_DATA,
ENABLE_VERIFICATION_REQUIREMENT,
DISABLE_VERIFICATION_REQUIREMENT,
ENABLE_PERMANET_STATE,
DISABLE_PERMANET_STATE
} |
| | Command that the component can accept.
More...
|
| enum | M24SR_communication_t { SYNC,
ASYNC
} |
| | Communication mode used by this device.
More...
|
Protected Member Functions |
| StatusTypeDef | M24SR_Init (M24SR_InitTypeDef *) |
| | This function initialize the M24SR device.
|
| StatusTypeDef | M24SR_GetSession (void) |
| | This function sends the GetSession command to the M24SR device.
|
| StatusTypeDef | M24SR_ForceSession (void) |
| | This function sends the KillSession command to the M24SR device.
|
| StatusTypeDef | M24SR_Deselect (void) |
| | This function sends the Deselect command (S-Block format)
|
| StatusTypeDef | M24SR_SendSelectApplication (void) |
| | This function sends the SelectApplication command.
|
| StatusTypeDef | M24SR_SendSelectCCfile (void) |
| | This function sends the SelectCCFile command.
|
| StatusTypeDef | M24SR_SendSelectNDEFfile (uint16_t NDEFfileId) |
| | This function sends the SelectNDEFfile command.
|
| StatusTypeDef | M24SR_SendSelectSystemfile (void) |
| | This function sends the SelectSystemFile command.
|
| StatusTypeDef | M24SR_SendReadBinary (uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead) |
| | This function sends a read binary command.
|
| StatusTypeDef | M24SR_SendSTReadBinary (uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead) |
| | This function sends a ST read binary command (no error if access is not inside NDEF file)
|
| StatusTypeDef | M24SR_SendUpdateBinary (uint16_t Offset, uint8_t NbByteToWrite, uint8_t *pDataToWrite) |
| | This function sends a Update binary command.
|
| StatusTypeDef | M24SR_SendVerify (uint16_t uPwdId, uint8_t NbPwdByte, const uint8_t *pPwd) |
| | This function sends the Verify command.
|
| StatusTypeDef | M24SR_SendChangeReferenceData (uint16_t uPwdId, uint8_t *pPwd) |
| | This function sends the ChangeReferenceData command.
|
| StatusTypeDef | M24SR_SendEnableVerificationRequirement (uint16_t uReadOrWrite) |
| | This function sends the EnableVerificationRequirement command.
|
| StatusTypeDef | M24SR_SendDisableVerificationRequirement (uint16_t uReadOrWrite) |
| | This function sends the DisableVerificationRequirement command.
|
| StatusTypeDef | M24SR_SendEnablePermanentState (uint16_t uReadOrWrite) |
| | This function sends the EnablePermananentState command.
|
| StatusTypeDef | M24SR_SendDisablePermanentState (uint16_t uReadOrWrite) |
| | This function sends the DisablePermanentState command.
|
| StatusTypeDef | M24SR_SendInterrupt (void) |
| | This function generates an interrupt on GPO pin.
|
| StatusTypeDef | M24SR_StateControl (uint8_t uSetOrReset) |
| | This function forces GPO pin to low state or high Z.
|
| StatusTypeDef | M24SR_SendFWTExtension (uint8_t FWTbyte) |
| | This function sends the FWT extension command (S-Block format)
|
| StatusTypeDef | M24SR_IO_SendI2Ccommand (uint8_t NbByte, uint8_t *pBuffer) |
| | Send a command to the component.
|
| StatusTypeDef | M24SR_IO_ReceiveI2Cresponse (uint8_t NbByte, uint8_t *pBuffer) |
| | Read a command response.
|
| StatusTypeDef | M24SR_IO_PollI2C (void) |
| | Do an active polling on the I2C bus until the answer is ready.
|
| void | M24SR_IO_GPO_ReadPin (uint8_t *pPinState) |
| | Read the gpo pin.
|
| void | M24SR_IO_RFDIS_WritePin (uint8_t PinState) |
| | Write the gpo pin.
|
| Callbacks * | getCallback () |
| | get the callback object to use
|
Protected Attributes |
| DigitalOut | RFDisablePin |
| | Pin used to disable the rf chip functionality.
|
| uint8_t | uM24SRbuffer [0xFF] |
| | Buffer used to build the command to send to the chip.
|
| uint8_t | uDIDbyte |
| | ???
|
| M24SR_communication_t | mCommunicationType |
| | Type of communication being used.
|
| M24SR_command_t | mLastCommandSend |
| | Last pending command.
|
| M24SR_command_data_t | mLastCommandData |
| | Parameter used to invoke the last command.
|
| InterruptIn | mGpoEventInterrupt |
| | Interrupt object fired when the gpo status changes.
|
| Callbacks * | mCallback |
| | object containing the callbacks to use
|
| Callbacks * | mComponentCallback |
| | Object with private callbacks used to hide high level commands each calling multiple low level commands.
|
| NDefNfcTagM24SR * | mNDefTagUtil |
| | Object implementing the interface to use the NDefLib.
|