Firmware library for the X-NUCLEO-NFC01A1 Dynamic NFC Tag board.
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 10:482175f7ae66, committed 2016-01-14
- Comitter:
- giovannivisentini
- Date:
- Thu Jan 14 08:41:19 2016 +0000
- Parent:
- 9:9f2e2e68d695
- Child:
- 12:d1f5eaa85deb
- Child:
- 13:840a9c7f90b9
- Commit message:
- fix compile error
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 Thu Jan 14 07:54:59 2016 +0000
+++ b/m24sr/m24sr_class.cpp Thu Jan 14 08:41:19 2016 +0000
@@ -1088,7 +1088,7 @@
NFC_StatusTypeDef M24SR::M24SR_IO_SendI2Ccommand(uint8_t NbByte,
uint8_t *pBuffer) {
- int ret = dev_i2c.write(address, (char*) pBuffer, NbByte);
+ int ret = dev_I2C.write(address, (char*) pBuffer, NbByte);
if (ret == 0)
return NFC_SUCCESS;
return NFC_IO_ERROR_I2CTIMEOUT;
@@ -1096,7 +1096,7 @@
NFC_StatusTypeDef M24SR::M24SR_IO_ReceiveI2Cresponse(uint8_t NbByte,
uint8_t *pBuffer) {
- int ret = dev_i2c.read(address, (char*) pBuffer, NbByte);
+ int ret = dev_I2C.read(address, (char*) pBuffer, NbByte);
if (ret == 0)
return NFC_SUCCESS;
@@ -1115,7 +1115,7 @@
//
wait_ms(M24SR_POLL_DELAY);
while (status != 0 && nbTry < M24SR_I2C_POLLING) {
- status = dev_i2c.read(address, &buffer, 1, false);
+ status = dev_I2C.read(address, &buffer, 1, false);
nbTry++;
}

X-NUCLEO-NFC01A1 Dynamic NFC Tag