Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: M24SR
Dependents: NFC M2M_2016_STM32 MyongjiElec_capstone1 IDW01M1_Cloud_IBM ... more
Fork of X_NUCLEO_NFC01A1 by
X-NUCLEO-NFC01A1 Dynamic NFC Tag Expansion Board Firmware Package
Introduction
This firmware package includes Components Device Drivers, Board Support Package and example applications for STMicroelectronics X-NUCLEO-NFC01A1 Dynamic NFC Tag Expansion Board based on M24SR.
Firmware Library
Class X_NUCLEO_NFC01A1 is intended to represent the Dynamic NFC Tag Expansion Board with the same name.
It provides an API to access to the M24SR component and to the three onboard LEDs.
It is intentionally implemented as a singleton because only one X_NUCLEO_NFC01A1 at a time might be deployed in a HW component stack.
The library also provides an implementation of the NDEF library API for M24SR, providing an simple way to read/write NDEF formatted messages from/to the M24SR dynamic NFC tag.
Example applications
1. Hello World
2. Asynchronous Hello World
Revision 4:cb1b4304a93e, committed 2015-12-22
- Comitter:
- giovannivisentini
- Date:
- Tue Dec 22 08:23:54 2015 +0000
- Parent:
- 2:35b4626e5305
- Child:
- 5:71d13a8d9ce0
- Commit message:
- add static to utility function
Changed in this revision
| m24sr/m24sr_class.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/m24sr/m24sr_class.cpp Mon Dec 21 10:17:35 2015 +0000
+++ b/m24sr/m24sr_class.cpp Tue Dec 22 08:23:54 2015 +0000
@@ -76,7 +76,7 @@
* @param None
* @retval None
*/
-uint16_t M24SR_UpdateCrc(uint8_t ch, uint16_t *lpwCrc) {
+static uint16_t M24SR_UpdateCrc(uint8_t ch, uint16_t *lpwCrc) {
ch = (ch ^ (uint8_t) ((*lpwCrc) & 0x00FF));
ch = (ch ^ (ch << 4));
*lpwCrc = (*lpwCrc >> 8) ^ ((uint16_t) ch << 8) ^ ((uint16_t) ch << 3)
@@ -91,7 +91,7 @@
* @param Length : number of byte of the data
* @retval CRC16
*/
-uint16_t M24SR_ComputeCrc(uint8_t *Data, uint8_t Length) {
+static uint16_t M24SR_ComputeCrc(uint8_t *Data, uint8_t Length) {
uint8_t chBlock;
uint16_t wCrc = 0x6363; // ITU-V.41
@@ -110,7 +110,7 @@
* @retval Status (SW1&SW2) : CRC16 residue is correct
* @retval M24SR_ERROR_CRC : CRC16 residue is false
*/
-NFC_StatusTypeDef M24SR_IsCorrectCRC16Residue(uint8_t *DataIn, uint8_t Length) {
+static NFC_StatusTypeDef M24SR_IsCorrectCRC16Residue(uint8_t *DataIn, uint8_t Length) {
uint16_t ResCRC = 0x0000;
/* check the CRC16 Residue */
@@ -142,7 +142,7 @@
* @param NbByte : number of byte of the command
* @param pCommand : pointer of the command created
*/
-void M24SR_BuildIBlockCommand(uint16_t CommandStructure, C_APDU *Command,
+static void M24SR_BuildIBlockCommand(uint16_t CommandStructure, C_APDU *Command,
uint8_t uDIDbyte, uint16_t *NbByte, uint8_t *pCommand) {
uint16_t uCRC16;
static uint8_t BlockNumber = 0x01;

X-NUCLEO-NFC01A1 Dynamic NFC Tag