Fork of the GitHub

Committer:
DiegoOstuni
Date:
Thu Nov 14 14:34:50 2019 +0000
Revision:
0:75fc82583a41
Add files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DiegoOstuni 0:75fc82583a41 1
DiegoOstuni 0:75fc82583a41 2 /******************************************************************************
DiegoOstuni 0:75fc82583a41 3 * @attention
DiegoOstuni 0:75fc82583a41 4 *
DiegoOstuni 0:75fc82583a41 5 * <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
DiegoOstuni 0:75fc82583a41 6 *
DiegoOstuni 0:75fc82583a41 7 * Licensed under ST MYLIBERTY SOFTWARE LICENSE AGREEMENT (the "License");
DiegoOstuni 0:75fc82583a41 8 * You may not use this file except in compliance with the License.
DiegoOstuni 0:75fc82583a41 9 * You may obtain a copy of the License at:
DiegoOstuni 0:75fc82583a41 10 *
DiegoOstuni 0:75fc82583a41 11 * http://www.st.com/myliberty
DiegoOstuni 0:75fc82583a41 12 *
DiegoOstuni 0:75fc82583a41 13 * Unless required by applicable law or agreed to in writing, software
DiegoOstuni 0:75fc82583a41 14 * distributed under the License is distributed on an "AS IS" BASIS,
DiegoOstuni 0:75fc82583a41 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
DiegoOstuni 0:75fc82583a41 16 * AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
DiegoOstuni 0:75fc82583a41 17 * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
DiegoOstuni 0:75fc82583a41 18 * See the License for the specific language governing permissions and
DiegoOstuni 0:75fc82583a41 19 * limitations under the License.
DiegoOstuni 0:75fc82583a41 20 *
DiegoOstuni 0:75fc82583a41 21 ******************************************************************************/
DiegoOstuni 0:75fc82583a41 22
DiegoOstuni 0:75fc82583a41 23 /*
DiegoOstuni 0:75fc82583a41 24 * PROJECT: ST25R391x firmware
DiegoOstuni 0:75fc82583a41 25 * $Revision: $
DiegoOstuni 0:75fc82583a41 26 * LANGUAGE: ISO C99
DiegoOstuni 0:75fc82583a41 27 */
DiegoOstuni 0:75fc82583a41 28
DiegoOstuni 0:75fc82583a41 29 /*! \file rfal_st25tb.h
DiegoOstuni 0:75fc82583a41 30 *
DiegoOstuni 0:75fc82583a41 31 * \author Gustavo Patricio
DiegoOstuni 0:75fc82583a41 32 *
DiegoOstuni 0:75fc82583a41 33 * \brief Implementation of ST25TB interface
DiegoOstuni 0:75fc82583a41 34 *
DiegoOstuni 0:75fc82583a41 35 *
DiegoOstuni 0:75fc82583a41 36 * @addtogroup RFAL
DiegoOstuni 0:75fc82583a41 37 * @{
DiegoOstuni 0:75fc82583a41 38 *
DiegoOstuni 0:75fc82583a41 39 * @addtogroup RFAL-AL
DiegoOstuni 0:75fc82583a41 40 * @brief RFAL Abstraction Layer
DiegoOstuni 0:75fc82583a41 41 * @{
DiegoOstuni 0:75fc82583a41 42 *
DiegoOstuni 0:75fc82583a41 43 * @addtogroup ST25TB
DiegoOstuni 0:75fc82583a41 44 * @brief RFAL ST25TB Module
DiegoOstuni 0:75fc82583a41 45 * @{
DiegoOstuni 0:75fc82583a41 46 *
DiegoOstuni 0:75fc82583a41 47 */
DiegoOstuni 0:75fc82583a41 48
DiegoOstuni 0:75fc82583a41 49
DiegoOstuni 0:75fc82583a41 50 #ifndef RFAL_ST25TB_H
DiegoOstuni 0:75fc82583a41 51 #define RFAL_ST25TB_H
DiegoOstuni 0:75fc82583a41 52
DiegoOstuni 0:75fc82583a41 53 /*
DiegoOstuni 0:75fc82583a41 54 ******************************************************************************
DiegoOstuni 0:75fc82583a41 55 * INCLUDES
DiegoOstuni 0:75fc82583a41 56 ******************************************************************************
DiegoOstuni 0:75fc82583a41 57 */
DiegoOstuni 0:75fc82583a41 58 #include "platform1.h"
DiegoOstuni 0:75fc82583a41 59 #include "st_errno.h"
DiegoOstuni 0:75fc82583a41 60 #include "rfal_rf.h"
DiegoOstuni 0:75fc82583a41 61 #include "rfal_nfcb.h"
DiegoOstuni 0:75fc82583a41 62
DiegoOstuni 0:75fc82583a41 63 /*
DiegoOstuni 0:75fc82583a41 64 ******************************************************************************
DiegoOstuni 0:75fc82583a41 65 * GLOBAL DEFINES
DiegoOstuni 0:75fc82583a41 66 ******************************************************************************
DiegoOstuni 0:75fc82583a41 67 */
DiegoOstuni 0:75fc82583a41 68
DiegoOstuni 0:75fc82583a41 69 #define RFAL_ST25TB_CHIP_ID_LEN 1 /*!< ST25TB chip ID length */
DiegoOstuni 0:75fc82583a41 70 #define RFAL_ST25TB_CRC_LEN 2 /*!< ST25TB CRC length */
DiegoOstuni 0:75fc82583a41 71 #define RFAL_ST25TB_UID_LEN 8 /*!< ST25TB Unique ID length */
DiegoOstuni 0:75fc82583a41 72 #define RFAL_ST25TB_BLOCK_LEN 4 /*!< ST25TB Data Block length */
DiegoOstuni 0:75fc82583a41 73
DiegoOstuni 0:75fc82583a41 74 /*
DiegoOstuni 0:75fc82583a41 75 ******************************************************************************
DiegoOstuni 0:75fc82583a41 76 * GLOBAL MACROS
DiegoOstuni 0:75fc82583a41 77 ******************************************************************************
DiegoOstuni 0:75fc82583a41 78 */
DiegoOstuni 0:75fc82583a41 79
DiegoOstuni 0:75fc82583a41 80
DiegoOstuni 0:75fc82583a41 81
DiegoOstuni 0:75fc82583a41 82 /*
DiegoOstuni 0:75fc82583a41 83 ******************************************************************************
DiegoOstuni 0:75fc82583a41 84 * GLOBAL TYPES
DiegoOstuni 0:75fc82583a41 85 ******************************************************************************
DiegoOstuni 0:75fc82583a41 86 */
DiegoOstuni 0:75fc82583a41 87 typedef uint8_t rfalSt25tbUID[RFAL_ST25TB_UID_LEN]; /*!< ST25TB UID type */
DiegoOstuni 0:75fc82583a41 88 typedef uint8_t rfalSt25tbBlock[RFAL_ST25TB_BLOCK_LEN]; /*!< ST25TB Block type */
DiegoOstuni 0:75fc82583a41 89
DiegoOstuni 0:75fc82583a41 90
DiegoOstuni 0:75fc82583a41 91 /*! ST25TB listener device (PICC) struct */
DiegoOstuni 0:75fc82583a41 92 typedef struct
DiegoOstuni 0:75fc82583a41 93 {
DiegoOstuni 0:75fc82583a41 94 uint8_t chipID; /*!< Device's session Chip ID */
DiegoOstuni 0:75fc82583a41 95 rfalSt25tbUID UID; /*!< Device's UID */
DiegoOstuni 0:75fc82583a41 96 bool isDeselected; /*!< Device deselect flag */
DiegoOstuni 0:75fc82583a41 97 }rfalSt25tbListenDevice;
DiegoOstuni 0:75fc82583a41 98
DiegoOstuni 0:75fc82583a41 99
DiegoOstuni 0:75fc82583a41 100 /*
DiegoOstuni 0:75fc82583a41 101 ******************************************************************************
DiegoOstuni 0:75fc82583a41 102 * GLOBAL FUNCTION PROTOTYPES
DiegoOstuni 0:75fc82583a41 103 ******************************************************************************
DiegoOstuni 0:75fc82583a41 104 */
DiegoOstuni 0:75fc82583a41 105
DiegoOstuni 0:75fc82583a41 106 /*!
DiegoOstuni 0:75fc82583a41 107 *****************************************************************************
DiegoOstuni 0:75fc82583a41 108 * \brief Initialize ST25TB Poller mode
DiegoOstuni 0:75fc82583a41 109 *
DiegoOstuni 0:75fc82583a41 110 * This methods configures RFAL RF layer to perform as a
DiegoOstuni 0:75fc82583a41 111 * ST25TB Poller/RW including all default timings
DiegoOstuni 0:75fc82583a41 112 *
DiegoOstuni 0:75fc82583a41 113 * \return ERR_WRONG_STATE : RFAL not initialized or mode not set
DiegoOstuni 0:75fc82583a41 114 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 115 *****************************************************************************
DiegoOstuni 0:75fc82583a41 116 */
DiegoOstuni 0:75fc82583a41 117 ReturnCode rfalSt25tbPollerInitialize( SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 118
DiegoOstuni 0:75fc82583a41 119
DiegoOstuni 0:75fc82583a41 120 /*!
DiegoOstuni 0:75fc82583a41 121 *****************************************************************************
DiegoOstuni 0:75fc82583a41 122 * \brief ST25TB Poller Check Presence
DiegoOstuni 0:75fc82583a41 123 *
DiegoOstuni 0:75fc82583a41 124 * This method checks if a ST25TB Listen device (PICC) is present on the field
DiegoOstuni 0:75fc82583a41 125 * by sending an Initiate command
DiegoOstuni 0:75fc82583a41 126 *
DiegoOstuni 0:75fc82583a41 127 * \param[out] chipId : if successfully retrieved, the device's chip ID
DiegoOstuni 0:75fc82583a41 128 *
DiegoOstuni 0:75fc82583a41 129 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 130 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 131 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 132 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 133 * \return ERR_RF_COLLISION : Collision detected one or more device in the field
DiegoOstuni 0:75fc82583a41 134 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 135 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 136 *****************************************************************************
DiegoOstuni 0:75fc82583a41 137 */
DiegoOstuni 0:75fc82583a41 138 ReturnCode rfalSt25tbPollerCheckPresence( uint8_t *chipId, SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 139
DiegoOstuni 0:75fc82583a41 140
DiegoOstuni 0:75fc82583a41 141 /*!
DiegoOstuni 0:75fc82583a41 142 *****************************************************************************
DiegoOstuni 0:75fc82583a41 143 * \brief ST25TB Poller Collision Resolution
DiegoOstuni 0:75fc82583a41 144 *
DiegoOstuni 0:75fc82583a41 145 * This method performs ST25TB Collision resolution, selects the each device,
DiegoOstuni 0:75fc82583a41 146 * retrieves its UID and then deselects.
DiegoOstuni 0:75fc82583a41 147 * In case only one device is identified the ST25TB device is left in select
DiegoOstuni 0:75fc82583a41 148 * state.
DiegoOstuni 0:75fc82583a41 149 *
DiegoOstuni 0:75fc82583a41 150 * \param[in] devLimit : device limit value, and size st25tbDevList
DiegoOstuni 0:75fc82583a41 151 * \param[out] st25tbDevList : ST35TB listener device info
DiegoOstuni 0:75fc82583a41 152 * \param[out] devCnt : Devices found counter
DiegoOstuni 0:75fc82583a41 153 *
DiegoOstuni 0:75fc82583a41 154 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 155 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 156 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 157 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 158 * \return ERR_RF_COLLISION : Collision detected one or more device in the field
DiegoOstuni 0:75fc82583a41 159 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 160 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 161 *****************************************************************************
DiegoOstuni 0:75fc82583a41 162 */
DiegoOstuni 0:75fc82583a41 163 ReturnCode rfalSt25tbPollerCollisionResolution( uint8_t devLimit, rfalSt25tbListenDevice *st25tbDevList, uint8_t *devCnt,SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 164
DiegoOstuni 0:75fc82583a41 165 /*!
DiegoOstuni 0:75fc82583a41 166 *****************************************************************************
DiegoOstuni 0:75fc82583a41 167 * \brief ST25TB Poller Initiate
DiegoOstuni 0:75fc82583a41 168 *
DiegoOstuni 0:75fc82583a41 169 * This method sends an Initiate command
DiegoOstuni 0:75fc82583a41 170 *
DiegoOstuni 0:75fc82583a41 171 * If a single device responds the chip ID will be retrieved
DiegoOstuni 0:75fc82583a41 172 *
DiegoOstuni 0:75fc82583a41 173 * \param[out] chipId : chip ID of the device
DiegoOstuni 0:75fc82583a41 174 *
DiegoOstuni 0:75fc82583a41 175 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 176 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 177 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 178 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 179 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 180 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 181 *****************************************************************************
DiegoOstuni 0:75fc82583a41 182 */
DiegoOstuni 0:75fc82583a41 183 ReturnCode rfalSt25tbPollerInitiate( uint8_t *chipId,SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 184
DiegoOstuni 0:75fc82583a41 185
DiegoOstuni 0:75fc82583a41 186 /*!
DiegoOstuni 0:75fc82583a41 187 *****************************************************************************
DiegoOstuni 0:75fc82583a41 188 * \brief ST25TB Poller Pcall
DiegoOstuni 0:75fc82583a41 189 *
DiegoOstuni 0:75fc82583a41 190 * This method sends a Pcall command
DiegoOstuni 0:75fc82583a41 191 * If successful the device's chip ID will be retrieved
DiegoOstuni 0:75fc82583a41 192 *
DiegoOstuni 0:75fc82583a41 193 * \param[out] chipId : Chip ID of the device
DiegoOstuni 0:75fc82583a41 194 *
DiegoOstuni 0:75fc82583a41 195 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 196 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 197 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 198 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 199 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 200 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 201 *****************************************************************************
DiegoOstuni 0:75fc82583a41 202 */
DiegoOstuni 0:75fc82583a41 203 ReturnCode rfalSt25tbPollerPcall( uint8_t *chipId );
DiegoOstuni 0:75fc82583a41 204
DiegoOstuni 0:75fc82583a41 205
DiegoOstuni 0:75fc82583a41 206 /*!
DiegoOstuni 0:75fc82583a41 207 *****************************************************************************
DiegoOstuni 0:75fc82583a41 208 * \brief ST25TB Poller Slot Marker
DiegoOstuni 0:75fc82583a41 209 *
DiegoOstuni 0:75fc82583a41 210 * This method sends a Slot Marker
DiegoOstuni 0:75fc82583a41 211 *
DiegoOstuni 0:75fc82583a41 212 * If a single device responds the chip ID will be retrieved
DiegoOstuni 0:75fc82583a41 213 *
DiegoOstuni 0:75fc82583a41 214 * \param[in] slotNum : Slot Number
DiegoOstuni 0:75fc82583a41 215 * \param[out] chipIdRes : Chip ID of the device
DiegoOstuni 0:75fc82583a41 216 *
DiegoOstuni 0:75fc82583a41 217 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 218 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 219 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 220 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 221 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 222 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 223 *****************************************************************************
DiegoOstuni 0:75fc82583a41 224 */
DiegoOstuni 0:75fc82583a41 225 ReturnCode rfalSt25tbPollerSlotMarker( uint8_t slotNum, uint8_t *chipIdRes,SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 226
DiegoOstuni 0:75fc82583a41 227
DiegoOstuni 0:75fc82583a41 228 /*!
DiegoOstuni 0:75fc82583a41 229 *****************************************************************************
DiegoOstuni 0:75fc82583a41 230 * \brief ST25TB Poller Select
DiegoOstuni 0:75fc82583a41 231 *
DiegoOstuni 0:75fc82583a41 232 * This method sends a ST25TB Select command with the given chip ID.
DiegoOstuni 0:75fc82583a41 233 *
DiegoOstuni 0:75fc82583a41 234 * If the device is already in Selected state and receives an incorrect chip
DiegoOstuni 0:75fc82583a41 235 * ID, it goes into Deselected state
DiegoOstuni 0:75fc82583a41 236 *
DiegoOstuni 0:75fc82583a41 237 * \param[in] chipId : chip ID of the device to be selected
DiegoOstuni 0:75fc82583a41 238 *
DiegoOstuni 0:75fc82583a41 239 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 240 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 241 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 242 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 243 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 244 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 245 *****************************************************************************
DiegoOstuni 0:75fc82583a41 246 */
DiegoOstuni 0:75fc82583a41 247 ReturnCode rfalSt25tbPollerSelect( uint8_t chipId,SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 248
DiegoOstuni 0:75fc82583a41 249
DiegoOstuni 0:75fc82583a41 250 /*!
DiegoOstuni 0:75fc82583a41 251 *****************************************************************************
DiegoOstuni 0:75fc82583a41 252 * \brief ST25TB Get UID
DiegoOstuni 0:75fc82583a41 253 *
DiegoOstuni 0:75fc82583a41 254 * This method sends a Get_UID command
DiegoOstuni 0:75fc82583a41 255 *
DiegoOstuni 0:75fc82583a41 256 * If a single device responds the chip UID will be retrieved
DiegoOstuni 0:75fc82583a41 257 *
DiegoOstuni 0:75fc82583a41 258 * \param[out] UID : UID of the found device
DiegoOstuni 0:75fc82583a41 259 *
DiegoOstuni 0:75fc82583a41 260 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 261 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 262 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 263 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 264 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 265 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 266 *****************************************************************************
DiegoOstuni 0:75fc82583a41 267 */
DiegoOstuni 0:75fc82583a41 268 ReturnCode rfalSt25tbPollerGetUID( rfalSt25tbUID *UID,SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 269
DiegoOstuni 0:75fc82583a41 270
DiegoOstuni 0:75fc82583a41 271 /*!
DiegoOstuni 0:75fc82583a41 272 *****************************************************************************
DiegoOstuni 0:75fc82583a41 273 * \brief ST25TB Poller Read Block
DiegoOstuni 0:75fc82583a41 274 *
DiegoOstuni 0:75fc82583a41 275 * This method reads a block of the ST25TB
DiegoOstuni 0:75fc82583a41 276 *
DiegoOstuni 0:75fc82583a41 277 * \param[in] blockAddress : address of the block to be read
DiegoOstuni 0:75fc82583a41 278 * \param[out] blockData : location to place the data read from block
DiegoOstuni 0:75fc82583a41 279 *
DiegoOstuni 0:75fc82583a41 280 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 281 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 282 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 283 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 284 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 285 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 286 *****************************************************************************
DiegoOstuni 0:75fc82583a41 287 */
DiegoOstuni 0:75fc82583a41 288 ReturnCode rfalSt25tbPollerReadBlock( uint8_t blockAddress, rfalSt25tbBlock *blockData,SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 289
DiegoOstuni 0:75fc82583a41 290
DiegoOstuni 0:75fc82583a41 291 /*!
DiegoOstuni 0:75fc82583a41 292 *****************************************************************************
DiegoOstuni 0:75fc82583a41 293 * \brief ST25TB Poller Write Block
DiegoOstuni 0:75fc82583a41 294 *
DiegoOstuni 0:75fc82583a41 295 * This method writes a block of the ST25TB
DiegoOstuni 0:75fc82583a41 296 *
DiegoOstuni 0:75fc82583a41 297 * \param[in] blockAddress : address of the block to be written
DiegoOstuni 0:75fc82583a41 298 * \param[in] blockData : data to be written on the block
DiegoOstuni 0:75fc82583a41 299 *
DiegoOstuni 0:75fc82583a41 300 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 301 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 302 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 303 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 304 * \return ERR_PROTO : Protocol error detected
DiegoOstuni 0:75fc82583a41 305 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 306 *****************************************************************************
DiegoOstuni 0:75fc82583a41 307 */
DiegoOstuni 0:75fc82583a41 308 ReturnCode rfalSt25tbPollerWriteBlock( uint8_t blockAddress, rfalSt25tbBlock *blockData,SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 309
DiegoOstuni 0:75fc82583a41 310
DiegoOstuni 0:75fc82583a41 311 /*!
DiegoOstuni 0:75fc82583a41 312 *****************************************************************************
DiegoOstuni 0:75fc82583a41 313 * \brief ST25TB Poller Completion
DiegoOstuni 0:75fc82583a41 314 *
DiegoOstuni 0:75fc82583a41 315 * This method sends a completion command to the ST25TB. After the
DiegoOstuni 0:75fc82583a41 316 * completion the card no longer will reply to any command.
DiegoOstuni 0:75fc82583a41 317 *
DiegoOstuni 0:75fc82583a41 318 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 319 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 320 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 321 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 322 * \return ERR_PROTO : Protocol error detected, invalid SENSB_RES received
DiegoOstuni 0:75fc82583a41 323 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 324 *****************************************************************************
DiegoOstuni 0:75fc82583a41 325 */
DiegoOstuni 0:75fc82583a41 326 ReturnCode rfalSt25tbPollerCompletion( SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 327
DiegoOstuni 0:75fc82583a41 328
DiegoOstuni 0:75fc82583a41 329 /*!
DiegoOstuni 0:75fc82583a41 330 *****************************************************************************
DiegoOstuni 0:75fc82583a41 331 * \brief ST25TB Poller Reset to Inventory
DiegoOstuni 0:75fc82583a41 332 *
DiegoOstuni 0:75fc82583a41 333 * This method sends a Reset to Inventory command to the ST25TB.
DiegoOstuni 0:75fc82583a41 334 *
DiegoOstuni 0:75fc82583a41 335 * \return ERR_WRONG_STATE : RFAL not initialized or incorrect mode
DiegoOstuni 0:75fc82583a41 336 * \return ERR_PARAM : Invalid parameters
DiegoOstuni 0:75fc82583a41 337 * \return ERR_IO : Generic internal error
DiegoOstuni 0:75fc82583a41 338 * \return ERR_TIMEOUT : Timeout error, no listener device detected
DiegoOstuni 0:75fc82583a41 339 * \return ERR_PROTO : Protocol error detected, invalid SENSB_RES received
DiegoOstuni 0:75fc82583a41 340 * \return ERR_NONE : No error
DiegoOstuni 0:75fc82583a41 341 *****************************************************************************
DiegoOstuni 0:75fc82583a41 342 */
DiegoOstuni 0:75fc82583a41 343 ReturnCode rfalSt25tbPollerResetToInventory( SPI* mspiChannel, ST25R3911* mST25, DigitalOut* gpio_cs, InterruptIn* IRQ, DigitalOut* fieldLED_01, DigitalOut* fieldLED_02, DigitalOut* fieldLED_03, DigitalOut* fieldLED_04, DigitalOut* fieldLED_05, DigitalOut* fieldLED_06 );
DiegoOstuni 0:75fc82583a41 344
DiegoOstuni 0:75fc82583a41 345
DiegoOstuni 0:75fc82583a41 346 #endif /* RFAL_ST25TB_H */
DiegoOstuni 0:75fc82583a41 347
DiegoOstuni 0:75fc82583a41 348 /**
DiegoOstuni 0:75fc82583a41 349 * @}
DiegoOstuni 0:75fc82583a41 350 *
DiegoOstuni 0:75fc82583a41 351 * @}
DiegoOstuni 0:75fc82583a41 352 *
DiegoOstuni 0:75fc82583a41 353 * @}
DiegoOstuni 0:75fc82583a41 354 */
DiegoOstuni 0:75fc82583a41 355