Functions for accessing M24SR device.

Dependents:   Nucleo_NFC_Example I2C_NFC_Master Print_Entire_Nucleo_NFC01A1_Memory

Fork of lib_M24SR by Enrico Gregoratto

Embed: (wiki syntax)

« Back to documentation index

lib_M24SR.c File Reference

lib_M24SR.c File Reference

This file help to manage M24SR in a NFC forum context. More...

Go to the source code of this file.

Functions

uint16_t M24SR_Initialization (uint8_t *CCBuffer, uint8_t size)
 This fonction initialize the M24SR.
uint16_t M24SR_GetNDEFFileId (uint16_t *NDEF_fileID)
 This fonction retrieve the NDEF file ID of NDEF file present in M24SR.
uint16_t M24SR_OpenNDEFSession (uint16_t NDEF_fileID, uint16_t Priority)
 This fonction configure the M24SR to access NDEF message by I2C.
uint16_t M24SR_CloseNDEFSession (uint16_t NDEF_fileID)
 This fonction close the NDEF Session.
uint16_t M24SR_ReadData (uint16_t Offset, uint16_t DataSize, uint8_t *pData)
 This fonction read the data stored in M24SR at defined offset.
uint16_t M24SR_ForceReadData (uint16_t Offset, uint16_t DataSize, uint8_t *pData)
 This fonction read the data stored in M24SR at defined offset without NDEF concideration.
uint16_t M24SR_WriteData (uint16_t Offset, uint16_t DataSize, uint8_t *pData)
 This fonction write data in M24SR at defined offset.
uint16_t M24SR_EnableReadPassword (uint8_t *pCurrentWritePassword, uint8_t *pNewPassword)
 This fonction activate the need of a password for next read access.
uint16_t M24SR_DisableReadPassword (uint8_t *pCurrentWritePassword)
 This fonction desactivate the need of a password for next read access.
uint16_t M24SR_EnableWritePassword (uint8_t *pCurrentWritePassword, uint8_t *pNewPassword)
 This fonction activate the need of a password for next write access.
uint16_t M24SR_DisableWritePassword (uint8_t *pCurrentWritePassword)
 This fonction desactivate the need of a password for next write access.
uint16_t M24SR_DisableAllPassword (uint8_t *pSuperUserPassword)
 This fonction desactivate the need of read and write password for next access.
uint16_t M24SR_EnableReadOnly (uint8_t *pCurrentWritePassword)
 This fonction enable read only mode.
uint16_t M24SR_DisableReadOnly (uint8_t *pCurrentWritePassword)
 This fonction disable read only mode.
uint16_t M24SR_EnableWriteOnly (uint8_t *pCurrentWritePassword)
 This fonction enable write only mode.
uint16_t M24SR_DisableWriteOnly (uint8_t *pCurrentWritePassword)
 This fonction disable write only mode.
uint16_t M24SR_ManageGPO (uc8 GPO_config, uc8 mode)
 This function configure GPO purpose for RF session.

Detailed Description

This file help to manage M24SR in a NFC forum context.

Author:
MMY Application Team
Version:
V1.1.0
Date:
20-October-2014
Attention:

© COPYRIGHT(c) 2014 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file lib_M24SR.c.