Official interfaces for ST components.
Dependents: X_NUCLEO_IKS01A1 mDot_X_NUCLEO_IKS01A1 53L0A1 X_NUCLEO_IKS01A1 ... more
Fork of ST_INTERFACES by
This library contains all abstract classes which together constitute the common API to which all existing and future ST components will adhere to.
Diff: Communications/Nfc.h
- Revision:
- 3:b1bb477e115e
- Parent:
- 1:a7810e7acf8d
- Child:
- 4:8f70f7159316
--- a/Communications/Nfc.h Tue Nov 29 17:43:48 2016 +0000 +++ b/Communications/Nfc.h Fri Mar 10 10:50:53 2017 +0100 @@ -47,21 +47,20 @@ /* Includes ------------------------------------------------------------------*/ -#include <ComponentObject.h> +#include <Component.h> typedef enum { NFC_SUCCESS = 0, -} NFC_StatusTypeDef; +} NFC_t; /* Error codes are in component driver */ /* Classes ------------------------------------------------------------------*/ /** -* An abstract class for Nfc components. -*/ -class Nfc : public ComponentObject -{ + * An abstract class for Nfc components. + */ +class Nfc : public Component { public: /** @@ -71,7 +70,7 @@ * @param[out] pBufferRead Buffer to store the read data into. * @return NFC_SUCCESS if no errors */ - virtual int ReadBinary(uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead) = 0; + virtual int read_binary(uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead) = 0; /** * Write data to the tag. @@ -80,9 +79,12 @@ * @param pDataToWrite Buffer to write. * @return NFC_SUCCESS if no errors */ - virtual int UpdateBinary(uint16_t Offset, uint8_t NbByteToWrite, uint8_t *pDataToWrite) = 0; + virtual int update_binary(uint16_t Offset, uint8_t NbByteToWrite, uint8_t *pDataToWrite) = 0; - virtual ~Nfc(){}; + /** + * @brief Destructor. + */ + virtual ~Nfc() {}; }; #endif /* __NFC_CLASS_H */