ST25DV library for the STMicroelectronics X-NUCLEO-NFC04A1
st25dv.h@0:bea5dbf3f7d5, 2019-11-14 (annotated)
- Committer:
- DiegoOstuni
- Date:
- Thu Nov 14 10:36:30 2019 +0000
- Revision:
- 0:bea5dbf3f7d5
Add Files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DiegoOstuni | 0:bea5dbf3f7d5 | 1 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 2 | ****************************************************************************** |
DiegoOstuni | 0:bea5dbf3f7d5 | 3 | * @file st25dv.h |
DiegoOstuni | 0:bea5dbf3f7d5 | 4 | * @author MMY Application Team |
DiegoOstuni | 0:bea5dbf3f7d5 | 5 | * @version $Revision: 3308 $ |
DiegoOstuni | 0:bea5dbf3f7d5 | 6 | * @date $Date: 2017-01-13 11:19:33 +0100 (Fri, 13 Jan 2017) $ |
DiegoOstuni | 0:bea5dbf3f7d5 | 7 | * @brief This file provides set of driver functions to manage communication |
DiegoOstuni | 0:bea5dbf3f7d5 | 8 | * @brief between MCU and ST25DV chip |
DiegoOstuni | 0:bea5dbf3f7d5 | 9 | ****************************************************************************** |
DiegoOstuni | 0:bea5dbf3f7d5 | 10 | * @attention |
DiegoOstuni | 0:bea5dbf3f7d5 | 11 | * |
DiegoOstuni | 0:bea5dbf3f7d5 | 12 | * <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2> |
DiegoOstuni | 0:bea5dbf3f7d5 | 13 | * |
DiegoOstuni | 0:bea5dbf3f7d5 | 14 | * Licensed under ST MYLIBERTY SOFTWARE LICENSE AGREEMENT (the "License"); |
DiegoOstuni | 0:bea5dbf3f7d5 | 15 | * You may not use this file except in compliance with the License. |
DiegoOstuni | 0:bea5dbf3f7d5 | 16 | * You may obtain a copy of the License at: |
DiegoOstuni | 0:bea5dbf3f7d5 | 17 | * |
DiegoOstuni | 0:bea5dbf3f7d5 | 18 | * http://www.st.com/myliberty |
DiegoOstuni | 0:bea5dbf3f7d5 | 19 | * |
DiegoOstuni | 0:bea5dbf3f7d5 | 20 | * Unless required by applicable law or agreed to in writing, software |
DiegoOstuni | 0:bea5dbf3f7d5 | 21 | * distributed under the License is distributed on an "AS IS" BASIS, |
DiegoOstuni | 0:bea5dbf3f7d5 | 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, |
DiegoOstuni | 0:bea5dbf3f7d5 | 23 | * AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY, |
DiegoOstuni | 0:bea5dbf3f7d5 | 24 | * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. |
DiegoOstuni | 0:bea5dbf3f7d5 | 25 | * See the License for the specific language governing permissions and |
DiegoOstuni | 0:bea5dbf3f7d5 | 26 | * limitations under the License. |
DiegoOstuni | 0:bea5dbf3f7d5 | 27 | * |
DiegoOstuni | 0:bea5dbf3f7d5 | 28 | ****************************************************************************** |
DiegoOstuni | 0:bea5dbf3f7d5 | 29 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 30 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 31 | /* Define to prevent recursive inclusion -------------------------------------*/ |
DiegoOstuni | 0:bea5dbf3f7d5 | 32 | #ifndef __ST25DV_H |
DiegoOstuni | 0:bea5dbf3f7d5 | 33 | #define __ST25DV_H |
DiegoOstuni | 0:bea5dbf3f7d5 | 34 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 35 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 36 | /* Includes ------------------------------------------------------------------*/ |
DiegoOstuni | 0:bea5dbf3f7d5 | 37 | #include <stdint.h> |
DiegoOstuni | 0:bea5dbf3f7d5 | 38 | #include <stddef.h> |
DiegoOstuni | 0:bea5dbf3f7d5 | 39 | #include "mbed.h" |
DiegoOstuni | 0:bea5dbf3f7d5 | 40 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 41 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 42 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 43 | /** @addtogroup BSP |
DiegoOstuni | 0:bea5dbf3f7d5 | 44 | * @{ |
DiegoOstuni | 0:bea5dbf3f7d5 | 45 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 46 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 47 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 48 | /** @addtogroup ST25DV |
DiegoOstuni | 0:bea5dbf3f7d5 | 49 | * @{ |
DiegoOstuni | 0:bea5dbf3f7d5 | 50 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 51 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 52 | /* Exported types ------------------------------------------------------------*/ |
DiegoOstuni | 0:bea5dbf3f7d5 | 53 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 54 | * @brief NFCTAG status enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 55 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 56 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 57 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 58 | NFCTAG_OK = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 59 | NFCTAG_ERROR = 1, |
DiegoOstuni | 0:bea5dbf3f7d5 | 60 | NFCTAG_BUSY = 2, |
DiegoOstuni | 0:bea5dbf3f7d5 | 61 | NFCTAG_TIMEOUT = 3, |
DiegoOstuni | 0:bea5dbf3f7d5 | 62 | NFCTAG_NACK = 4 |
DiegoOstuni | 0:bea5dbf3f7d5 | 63 | } NFCTAG_StatusTypeDef; |
DiegoOstuni | 0:bea5dbf3f7d5 | 64 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 65 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 66 | * @brief ST25DV Enable Disable enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 67 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 68 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 69 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 70 | ST25DV_DISABLE = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 71 | ST25DV_ENABLE |
DiegoOstuni | 0:bea5dbf3f7d5 | 72 | } ST25DV_EN_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 73 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 74 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 75 | * @brief ST25DV Energy Harvesting mode enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 76 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 77 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 78 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 79 | ST25DV_EH_ACTIVE_AFTER_BOOT = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 80 | ST25DV_EH_ON_DEMAND |
DiegoOstuni | 0:bea5dbf3f7d5 | 81 | } ST25DV_EH_MODE_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 82 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 83 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 84 | * @brief ST25DV FIELD status enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 85 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 86 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 87 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 88 | ST25DV_FIELD_OFF = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 89 | ST25DV_FIELD_ON |
DiegoOstuni | 0:bea5dbf3f7d5 | 90 | } ST25DV_FIELD_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 91 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 92 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 93 | * @brief ST25DV VCC status enumerator definition |
DiegoOstuni | 0:bea5dbf3f7d5 | 94 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 95 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 96 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 97 | ST25DV_VCC_OFF = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 98 | ST25DV_VCC_ON |
DiegoOstuni | 0:bea5dbf3f7d5 | 99 | } ST25DV_VCC_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 100 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 101 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 102 | * @brief ST25DV protection status enumerator definition |
DiegoOstuni | 0:bea5dbf3f7d5 | 103 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 104 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 105 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 106 | ST25DV_NO_PROT = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 107 | ST25DV_WRITE_PROT, |
DiegoOstuni | 0:bea5dbf3f7d5 | 108 | ST25DV_READ_PROT, |
DiegoOstuni | 0:bea5dbf3f7d5 | 109 | ST25DV_READWRITE_PROT |
DiegoOstuni | 0:bea5dbf3f7d5 | 110 | } ST25DV_PROTECTION_CONF; |
DiegoOstuni | 0:bea5dbf3f7d5 | 111 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 112 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 113 | * @brief ST25DV area protection enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 114 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 115 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 116 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 117 | ST25DV_PROT_ZONE1 = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 118 | ST25DV_PROT_ZONE2, |
DiegoOstuni | 0:bea5dbf3f7d5 | 119 | ST25DV_PROT_ZONE3, |
DiegoOstuni | 0:bea5dbf3f7d5 | 120 | ST25DV_PROT_ZONE4 |
DiegoOstuni | 0:bea5dbf3f7d5 | 121 | } ST25DV_PROTECTION_ZONE; |
DiegoOstuni | 0:bea5dbf3f7d5 | 122 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 123 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 124 | * @brief ST25DV password protection status enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 125 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 126 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 127 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 128 | ST25DV_NOT_PROTECTED = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 129 | ST25DV_PROT_PASSWD1, |
DiegoOstuni | 0:bea5dbf3f7d5 | 130 | ST25DV_PROT_PASSWD2, |
DiegoOstuni | 0:bea5dbf3f7d5 | 131 | ST25DV_PROT_PASSWD3 |
DiegoOstuni | 0:bea5dbf3f7d5 | 132 | } ST25DV_PASSWD_PROT_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 133 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 134 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 135 | * @brief ST25DV lock status enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 136 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 137 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 138 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 139 | ST25DV_UNLOCKED = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 140 | ST25DV_LOCKED |
DiegoOstuni | 0:bea5dbf3f7d5 | 141 | } ST25DV_LOCK_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 142 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 143 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 144 | * @brief ST25DV Number of Blocks for the CCFile enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 145 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 146 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 147 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 148 | ST25DV_CCFILE_1BLCK = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 149 | ST25DV_CCFILE_2BLCK |
DiegoOstuni | 0:bea5dbf3f7d5 | 150 | } ST25DV_CCFILE_BLOCK; |
DiegoOstuni | 0:bea5dbf3f7d5 | 151 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 152 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 153 | * @brief ST25DV session status enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 154 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 155 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 156 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 157 | ST25DV_SESSION_CLOSED = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 158 | ST25DV_SESSION_OPEN |
DiegoOstuni | 0:bea5dbf3f7d5 | 159 | } ST25DV_I2CSSO_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 160 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 161 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 162 | * @brief ST25DV area end address enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 163 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 164 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 165 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 166 | ST25DV_ZONE_END1 = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 167 | ST25DV_ZONE_END2, |
DiegoOstuni | 0:bea5dbf3f7d5 | 168 | ST25DV_ZONE_END3 |
DiegoOstuni | 0:bea5dbf3f7d5 | 169 | } ST25DV_END_ZONE; |
DiegoOstuni | 0:bea5dbf3f7d5 | 170 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 171 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 172 | * @brief ST25DV IT pulse duration enumerator definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 173 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 174 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 175 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 176 | ST25DV_302_US = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 177 | ST25DV_264_US, |
DiegoOstuni | 0:bea5dbf3f7d5 | 178 | ST25DV_226_US, |
DiegoOstuni | 0:bea5dbf3f7d5 | 179 | ST25DV_188_US, |
DiegoOstuni | 0:bea5dbf3f7d5 | 180 | ST25DV_151_US, |
DiegoOstuni | 0:bea5dbf3f7d5 | 181 | ST25DV_113_US, |
DiegoOstuni | 0:bea5dbf3f7d5 | 182 | ST25DV_75_US, |
DiegoOstuni | 0:bea5dbf3f7d5 | 183 | ST25DV_37_US |
DiegoOstuni | 0:bea5dbf3f7d5 | 184 | } ST25DV_PULSE_DURATION; |
DiegoOstuni | 0:bea5dbf3f7d5 | 185 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 186 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 187 | * @brief ST25DV Mailbox Current Message enumerator definition |
DiegoOstuni | 0:bea5dbf3f7d5 | 188 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 189 | typedef enum |
DiegoOstuni | 0:bea5dbf3f7d5 | 190 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 191 | ST25DV_NO_MSG = 0, |
DiegoOstuni | 0:bea5dbf3f7d5 | 192 | ST25DV_HOST_MSG, |
DiegoOstuni | 0:bea5dbf3f7d5 | 193 | ST25DV_RF_MSG |
DiegoOstuni | 0:bea5dbf3f7d5 | 194 | } ST25DV_CURRENT_MSG; |
DiegoOstuni | 0:bea5dbf3f7d5 | 195 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 196 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 197 | * @brief ST25DV EH Ctrl structure definition |
DiegoOstuni | 0:bea5dbf3f7d5 | 198 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 199 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 200 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 201 | ST25DV_EN_STATUS EH_EN_Mode; |
DiegoOstuni | 0:bea5dbf3f7d5 | 202 | ST25DV_EN_STATUS EH_on; |
DiegoOstuni | 0:bea5dbf3f7d5 | 203 | ST25DV_EN_STATUS Field_on; |
DiegoOstuni | 0:bea5dbf3f7d5 | 204 | ST25DV_EN_STATUS VCC_on; |
DiegoOstuni | 0:bea5dbf3f7d5 | 205 | } ST25DV_EH_CTRL; |
DiegoOstuni | 0:bea5dbf3f7d5 | 206 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 207 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 208 | * @brief ST25DV GPO structure definition |
DiegoOstuni | 0:bea5dbf3f7d5 | 209 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 210 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 211 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 212 | ST25DV_EN_STATUS GPO_RFUser_en; |
DiegoOstuni | 0:bea5dbf3f7d5 | 213 | ST25DV_EN_STATUS GPO_RFActivity_en; |
DiegoOstuni | 0:bea5dbf3f7d5 | 214 | ST25DV_EN_STATUS GPO_RFInterrupt_en; |
DiegoOstuni | 0:bea5dbf3f7d5 | 215 | ST25DV_EN_STATUS GPO_FieldChange_en; |
DiegoOstuni | 0:bea5dbf3f7d5 | 216 | ST25DV_EN_STATUS GPO_RFPutMsg_en; |
DiegoOstuni | 0:bea5dbf3f7d5 | 217 | ST25DV_EN_STATUS GPO_RFGetMsg_en; |
DiegoOstuni | 0:bea5dbf3f7d5 | 218 | ST25DV_EN_STATUS GPO_RFWrite_en; |
DiegoOstuni | 0:bea5dbf3f7d5 | 219 | ST25DV_EN_STATUS GPO_Enable; |
DiegoOstuni | 0:bea5dbf3f7d5 | 220 | } ST25DV_GPO; |
DiegoOstuni | 0:bea5dbf3f7d5 | 221 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 222 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 223 | * @brief ST25DV RF Management structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 224 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 225 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 226 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 227 | ST25DV_EN_STATUS RfDisable; |
DiegoOstuni | 0:bea5dbf3f7d5 | 228 | ST25DV_EN_STATUS RfSleep; |
DiegoOstuni | 0:bea5dbf3f7d5 | 229 | } ST25DV_RF_MNGT; |
DiegoOstuni | 0:bea5dbf3f7d5 | 230 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 231 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 232 | * @brief ST25DV RF Area protection structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 233 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 234 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 235 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 236 | ST25DV_PASSWD_PROT_STATUS PasswdCtrl; |
DiegoOstuni | 0:bea5dbf3f7d5 | 237 | ST25DV_PROTECTION_CONF RWprotection; |
DiegoOstuni | 0:bea5dbf3f7d5 | 238 | } ST25DV_RF_PROT_ZONE; |
DiegoOstuni | 0:bea5dbf3f7d5 | 239 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 240 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 241 | * @brief ST25DV I2C Area protection structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 242 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 243 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 244 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 245 | ST25DV_PROTECTION_CONF ProtectZone1; |
DiegoOstuni | 0:bea5dbf3f7d5 | 246 | ST25DV_PROTECTION_CONF ProtectZone2; |
DiegoOstuni | 0:bea5dbf3f7d5 | 247 | ST25DV_PROTECTION_CONF ProtectZone3; |
DiegoOstuni | 0:bea5dbf3f7d5 | 248 | ST25DV_PROTECTION_CONF ProtectZone4; |
DiegoOstuni | 0:bea5dbf3f7d5 | 249 | } ST25DV_I2C_PROT_ZONE; |
DiegoOstuni | 0:bea5dbf3f7d5 | 250 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 251 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 252 | * @brief ST25DV MB_CTRL_DYN register structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 253 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 254 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 255 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 256 | uint8_t MbEnable; |
DiegoOstuni | 0:bea5dbf3f7d5 | 257 | uint8_t HostPutMsg; |
DiegoOstuni | 0:bea5dbf3f7d5 | 258 | uint8_t RfPutMsg; |
DiegoOstuni | 0:bea5dbf3f7d5 | 259 | uint8_t HostMissMsg; |
DiegoOstuni | 0:bea5dbf3f7d5 | 260 | uint8_t RFMissMsg; |
DiegoOstuni | 0:bea5dbf3f7d5 | 261 | ST25DV_CURRENT_MSG CurrentMsg; |
DiegoOstuni | 0:bea5dbf3f7d5 | 262 | } ST25DV_MB_CTRL_DYN_STATUS; |
DiegoOstuni | 0:bea5dbf3f7d5 | 263 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 264 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 265 | * @brief ST25DV Lock CCFile structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 266 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 267 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 268 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 269 | ST25DV_LOCK_STATUS LckBck0; |
DiegoOstuni | 0:bea5dbf3f7d5 | 270 | ST25DV_LOCK_STATUS LckBck1; |
DiegoOstuni | 0:bea5dbf3f7d5 | 271 | } ST25DV_LOCK_CCFILE; |
DiegoOstuni | 0:bea5dbf3f7d5 | 272 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 273 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 274 | * @brief ST25DV Memory size structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 275 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 276 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 277 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 278 | uint8_t BlockSize; |
DiegoOstuni | 0:bea5dbf3f7d5 | 279 | uint16_t Mem_Size; |
DiegoOstuni | 0:bea5dbf3f7d5 | 280 | } ST25DV_MEM_SIZE; |
DiegoOstuni | 0:bea5dbf3f7d5 | 281 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 282 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 283 | * @brief ST25DV UID information structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 284 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 285 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 286 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 287 | uint32_t MsbUid; |
DiegoOstuni | 0:bea5dbf3f7d5 | 288 | uint32_t LsbUid; |
DiegoOstuni | 0:bea5dbf3f7d5 | 289 | } ST25DV_UID; |
DiegoOstuni | 0:bea5dbf3f7d5 | 290 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 291 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 292 | * @brief ST25DV Password structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 293 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 294 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 295 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 296 | uint32_t MsbPasswd; |
DiegoOstuni | 0:bea5dbf3f7d5 | 297 | uint32_t LsbPasswd; |
DiegoOstuni | 0:bea5dbf3f7d5 | 298 | } ST25DV_PASSWD; |
DiegoOstuni | 0:bea5dbf3f7d5 | 299 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 300 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
DiegoOstuni | 0:bea5dbf3f7d5 | 301 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 302 | * @brief NFCTAG standard driver API structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 303 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 304 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 305 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 306 | NFCTAG_StatusTypeDef (*Init)( I2C * , DigitalOut* ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 307 | NFCTAG_StatusTypeDef (*ReadID)( uint8_t * const , I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 308 | NFCTAG_StatusTypeDef (*IsReady)( const uint32_t , I2C *); |
DiegoOstuni | 0:bea5dbf3f7d5 | 309 | NFCTAG_StatusTypeDef (*GetITStatus)( uint16_t * const , I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 310 | NFCTAG_StatusTypeDef (*ConfigIT)( const uint16_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 311 | NFCTAG_StatusTypeDef (*ReadData)( uint8_t * const, const uint16_t, const uint16_t, I2C* ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 312 | NFCTAG_StatusTypeDef (*WriteData)( const uint8_t * const, const uint16_t, const uint16_t, I2C* ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 313 | NFCTAG_StatusTypeDef (*ReadRegister)( uint8_t * const, const uint16_t, const uint16_t, I2C* ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 314 | NFCTAG_StatusTypeDef (*WriteRegister)( const uint8_t * const, const uint16_t, const uint16_t, I2C* ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 315 | void *pData; |
DiegoOstuni | 0:bea5dbf3f7d5 | 316 | } NFCTAG_DrvTypeDef; |
DiegoOstuni | 0:bea5dbf3f7d5 | 317 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 318 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 319 | * @brief NFCTAG extended driver API structure definition. |
DiegoOstuni | 0:bea5dbf3f7d5 | 320 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 321 | typedef struct |
DiegoOstuni | 0:bea5dbf3f7d5 | 322 | { |
DiegoOstuni | 0:bea5dbf3f7d5 | 323 | NFCTAG_StatusTypeDef (*ReadICRev)( uint8_t * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 324 | NFCTAG_StatusTypeDef (*WriteITPulse)( const ST25DV_PULSE_DURATION, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 325 | NFCTAG_StatusTypeDef (*ReadITPulse)( ST25DV_PULSE_DURATION * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 326 | NFCTAG_StatusTypeDef (*ReadDataCurrentAddr)( uint8_t * const, const uint16_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 327 | NFCTAG_StatusTypeDef (*ReadUID)( ST25DV_UID * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 328 | NFCTAG_StatusTypeDef (*ReadDSFID)( uint8_t * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 329 | NFCTAG_StatusTypeDef (*ReadDsfidRFProtection)( ST25DV_LOCK_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 330 | NFCTAG_StatusTypeDef (*ReadAFI)( uint8_t * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 331 | NFCTAG_StatusTypeDef (*ReadAfiRFProtection)( ST25DV_LOCK_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 332 | NFCTAG_StatusTypeDef (*ReadI2CProtectZone)( ST25DV_I2C_PROT_ZONE * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 333 | NFCTAG_StatusTypeDef (*WriteI2CProtectZonex)( const ST25DV_PROTECTION_ZONE, const ST25DV_PROTECTION_CONF, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 334 | NFCTAG_StatusTypeDef (*ReadLockCCFile)( ST25DV_LOCK_CCFILE * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 335 | NFCTAG_StatusTypeDef (*WriteLockCCFile)( const ST25DV_CCFILE_BLOCK, const ST25DV_LOCK_STATUS, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 336 | NFCTAG_StatusTypeDef (*ReadLockCFG)( ST25DV_LOCK_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 337 | NFCTAG_StatusTypeDef (*WriteLockCFG)( const ST25DV_LOCK_STATUS, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 338 | NFCTAG_StatusTypeDef (*PresentI2CPassword)( const ST25DV_PASSWD, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 339 | NFCTAG_StatusTypeDef (*WriteI2CPassword)( const ST25DV_PASSWD, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 340 | NFCTAG_StatusTypeDef (*ReadRFZxSS)( const ST25DV_PROTECTION_ZONE, ST25DV_RF_PROT_ZONE * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 341 | NFCTAG_StatusTypeDef (*WriteRFZxSS)( const ST25DV_PROTECTION_ZONE, const ST25DV_RF_PROT_ZONE, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 342 | NFCTAG_StatusTypeDef (*ReadEndZonex)( const ST25DV_END_ZONE, uint8_t * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 343 | NFCTAG_StatusTypeDef (*WriteEndZonex)( const ST25DV_END_ZONE, const uint8_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 344 | NFCTAG_StatusTypeDef (*InitEndZone)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 345 | NFCTAG_StatusTypeDef (*CreateUserZone)( uint16_t, uint16_t, uint16_t, uint16_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 346 | NFCTAG_StatusTypeDef (*ReadMemSize)( ST25DV_MEM_SIZE * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 347 | NFCTAG_StatusTypeDef (*ReadEHMode)( ST25DV_EH_MODE_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 348 | NFCTAG_StatusTypeDef (*WriteEHMode)( const ST25DV_EH_MODE_STATUS, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 349 | NFCTAG_StatusTypeDef (*ReadRFMngt)( ST25DV_RF_MNGT * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 350 | NFCTAG_StatusTypeDef (*WriteRFMngt)( const uint8_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 351 | NFCTAG_StatusTypeDef (*GetRFDisable)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 352 | NFCTAG_StatusTypeDef (*SetRFDisable)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 353 | NFCTAG_StatusTypeDef (*ResetRFDisable)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 354 | NFCTAG_StatusTypeDef (*GetRFSleep)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 355 | NFCTAG_StatusTypeDef (*SetRFSleep)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 356 | NFCTAG_StatusTypeDef (*ResetRFSleep)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 357 | NFCTAG_StatusTypeDef (*ReadMBMode)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 358 | NFCTAG_StatusTypeDef (*WriteMBMode)( const ST25DV_EN_STATUS, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 359 | NFCTAG_StatusTypeDef (*ReadMBWDG)( uint8_t * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 360 | NFCTAG_StatusTypeDef (*WriteMBWDG)( const uint8_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 361 | NFCTAG_StatusTypeDef (*ReadMailboxData)( uint8_t * const, const uint16_t, const uint16_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 362 | NFCTAG_StatusTypeDef (*WriteMailboxData)( const uint8_t * const, const uint16_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 363 | NFCTAG_StatusTypeDef (*ReadMailboxRegister)( uint8_t * const, const uint16_t, const uint16_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 364 | NFCTAG_StatusTypeDef (*WriteMailboxRegister)( const uint8_t * const, const uint16_t, const uint16_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 365 | NFCTAG_StatusTypeDef (*ReadI2CSecuritySession_Dyn)( ST25DV_I2CSSO_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 366 | NFCTAG_StatusTypeDef (*ReadITSTStatus_Dyn)( uint8_t * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 367 | NFCTAG_StatusTypeDef (*ReadGPO_Dyn)( uint8_t *, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 368 | NFCTAG_StatusTypeDef (*GetGPO_en_Dyn)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 369 | NFCTAG_StatusTypeDef (*SetGPO_en_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 370 | NFCTAG_StatusTypeDef (*ResetGPO_en_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 371 | NFCTAG_StatusTypeDef (*ReadEHCtrl_Dyn)( ST25DV_EH_CTRL * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 372 | NFCTAG_StatusTypeDef (*GetEHENMode_Dyn)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 373 | NFCTAG_StatusTypeDef (*SetEHENMode_Dyn)( I2C *); |
DiegoOstuni | 0:bea5dbf3f7d5 | 374 | NFCTAG_StatusTypeDef (*ResetEHENMode_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 375 | NFCTAG_StatusTypeDef (*GetEHON_Dyn)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 376 | NFCTAG_StatusTypeDef (*GetRFField_Dyn)( ST25DV_FIELD_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 377 | NFCTAG_StatusTypeDef (*GetVCC_Dyn)( ST25DV_VCC_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 378 | NFCTAG_StatusTypeDef (*ReadRFMngt_Dyn)( ST25DV_RF_MNGT * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 379 | NFCTAG_StatusTypeDef (*WriteRFMngt_Dyn)( const uint8_t, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 380 | NFCTAG_StatusTypeDef (*GetRFDisable_Dyn)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 381 | NFCTAG_StatusTypeDef (*SetRFDisable_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 382 | NFCTAG_StatusTypeDef (*ResetRFDisable_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 383 | NFCTAG_StatusTypeDef (*GetRFSleep_Dyn)( ST25DV_EN_STATUS * const , I2C *); |
DiegoOstuni | 0:bea5dbf3f7d5 | 384 | NFCTAG_StatusTypeDef (*SetRFSleep_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 385 | NFCTAG_StatusTypeDef (*ResetRFSleep_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 386 | NFCTAG_StatusTypeDef (*ReadMBctrl_Dyn)( ST25DV_MB_CTRL_DYN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 387 | NFCTAG_StatusTypeDef (*GetMBEN_Dyn)( ST25DV_EN_STATUS * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 388 | NFCTAG_StatusTypeDef (*SetMBEN_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 389 | NFCTAG_StatusTypeDef (*ResetMBEN_Dyn)( I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 390 | NFCTAG_StatusTypeDef (*ReadMBLength_Dyn)( uint8_t * const, I2C * ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 391 | } NFCTAG_ExtDrvTypeDef; |
DiegoOstuni | 0:bea5dbf3f7d5 | 392 | #endif |
DiegoOstuni | 0:bea5dbf3f7d5 | 393 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 394 | /* Exported constants --------------------------------------------------------*/ |
DiegoOstuni | 0:bea5dbf3f7d5 | 395 | /** @brief ST25DV 4Kbits */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 396 | #define I_AM_ST25DV04 0x24 |
DiegoOstuni | 0:bea5dbf3f7d5 | 397 | /** @brief ST25DV 64Kbits */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 398 | #define I_AM_ST25DV64 0x26 |
DiegoOstuni | 0:bea5dbf3f7d5 | 399 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 400 | /*#ifndef NULL |
DiegoOstuni | 0:bea5dbf3f7d5 | 401 | #define NULL (void *) 0 |
DiegoOstuni | 0:bea5dbf3f7d5 | 402 | #endif |
DiegoOstuni | 0:bea5dbf3f7d5 | 403 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 404 | /** @brief I2C address to be used for ST25DV Data accesses. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 405 | #define ST25DV_ADDR_DATA_I2C 0xA6 |
DiegoOstuni | 0:bea5dbf3f7d5 | 406 | /** @brief I2C address to be used for ST25DV System accesses. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 407 | #define ST25DV_ADDR_SYST_I2C 0xAE |
DiegoOstuni | 0:bea5dbf3f7d5 | 408 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 409 | /** @brief I2C Time out (ms), min value : (Max write bytes) / (Internal page write) * tw (256/4)*5. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 410 | #define ST25DV_I2C_TIMEOUT 320 |
DiegoOstuni | 0:bea5dbf3f7d5 | 411 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 412 | /** @brief Size of the ST25DV write buffer. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 413 | #define ST25DV_MAX_WRITE_BYTE 256 |
DiegoOstuni | 0:bea5dbf3f7d5 | 414 | /** @brief Size of the ST25DVMailbox memory. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 415 | #define ST25DV_MAX_MAILBOX_LENGTH 256 |
DiegoOstuni | 0:bea5dbf3f7d5 | 416 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 417 | /* Registers i2c address */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 418 | /** @brief ST25DV GPO register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 419 | #define ST25DV_GPO_REG 0x0000 |
DiegoOstuni | 0:bea5dbf3f7d5 | 420 | /** @brief ST25DV IT duration register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 421 | #define ST25DV_ITTIME_REG 0x0001 |
DiegoOstuni | 0:bea5dbf3f7d5 | 422 | /** @brief ST25DV Energy Harvesting register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 423 | #define ST25DV_EH_MODE_REG 0x0002 |
DiegoOstuni | 0:bea5dbf3f7d5 | 424 | /** @brief ST25DV RF management register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 425 | #define ST25DV_RF_MNGT_REG 0x0003 |
DiegoOstuni | 0:bea5dbf3f7d5 | 426 | /** @brief ST25DV Area 1 security register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 427 | #define ST25DV_RFZ1SS_REG 0x0004 |
DiegoOstuni | 0:bea5dbf3f7d5 | 428 | /** @brief ST25DV Area 1 end address register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 429 | #define ST25DV_END1_REG 0x0005 |
DiegoOstuni | 0:bea5dbf3f7d5 | 430 | /** @brief ST25DV Area 2 security register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 431 | #define ST25DV_RFZ2SS_REG 0x0006 |
DiegoOstuni | 0:bea5dbf3f7d5 | 432 | /** @brief ST25DV Area 2 end address register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 433 | #define ST25DV_END2_REG 0x0007 |
DiegoOstuni | 0:bea5dbf3f7d5 | 434 | /** @brief ST25DV Area 3 security register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 435 | #define ST25DV_RFZ3SS_REG 0x0008 |
DiegoOstuni | 0:bea5dbf3f7d5 | 436 | /** @brief ST25DV Area 3 end address register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 437 | #define ST25DV_END3_REG 0x0009 |
DiegoOstuni | 0:bea5dbf3f7d5 | 438 | /** @brief ST25DV Area 4 security register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 439 | #define ST25DV_RFZ4SS_REG 0x000A |
DiegoOstuni | 0:bea5dbf3f7d5 | 440 | /** @brief ST25DV I2C security register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 441 | #define ST25DV_I2CZSS_REG 0x000B |
DiegoOstuni | 0:bea5dbf3f7d5 | 442 | /** @brief ST25DV Capability Container lock register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 443 | #define ST25DV_LOCKCCFILE_REG 0x000C |
DiegoOstuni | 0:bea5dbf3f7d5 | 444 | /** @brief ST25DV Mailbox mode register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 445 | #define ST25DV_MB_MODE_REG 0x000D |
DiegoOstuni | 0:bea5dbf3f7d5 | 446 | /** @brief ST25DV Mailbox Watchdog register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 447 | #define ST25DV_MB_WDG_REG 0x000E |
DiegoOstuni | 0:bea5dbf3f7d5 | 448 | /** @brief ST25DV Configuration lock register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 449 | #define ST25DV_LOCKCFG_REG 0x000F |
DiegoOstuni | 0:bea5dbf3f7d5 | 450 | /** @brief ST25DV DSFID lock register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 451 | #define ST25DV_LOCKDSFID_REG 0x0010 |
DiegoOstuni | 0:bea5dbf3f7d5 | 452 | /** @brief ST25DV AFI lock register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 453 | #define ST25DV_LOCKAFI_REG 0x0011 |
DiegoOstuni | 0:bea5dbf3f7d5 | 454 | /** @brief ST25DV DSFID register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 455 | #define ST25DV_DSFID_REG 0x0012 |
DiegoOstuni | 0:bea5dbf3f7d5 | 456 | /** @brief ST25DV AFI register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 457 | #define ST25DV_AFI_REG 0x0013 |
DiegoOstuni | 0:bea5dbf3f7d5 | 458 | /** @brief ST25DV Memory size register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 459 | #define ST25DV_MEM_SIZE_REG 0x0014 |
DiegoOstuni | 0:bea5dbf3f7d5 | 460 | /** @brief ST25DV ICref register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 461 | #define ST25DV_ICREF_REG 0x0017 |
DiegoOstuni | 0:bea5dbf3f7d5 | 462 | /** @brief ST25DV UID register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 463 | #define ST25DV_UID_REG 0x0018 |
DiegoOstuni | 0:bea5dbf3f7d5 | 464 | /** @brief ST25DV IC revision register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 465 | #define ST25DV_ICREV_REG 0x0020 |
DiegoOstuni | 0:bea5dbf3f7d5 | 466 | /** @brief ST25DV I2C password register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 467 | #define ST25DV_I2CPASSWD_REG 0x0900 |
DiegoOstuni | 0:bea5dbf3f7d5 | 468 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 469 | /* Dynamic Registers i2c address */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 470 | /** @brief ST25DV GPO dynamic register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 471 | #define ST25DV_GPO_DYN_REG 0x2000 |
DiegoOstuni | 0:bea5dbf3f7d5 | 472 | /** @brief ST25DV Energy Harvesting control dynamic register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 473 | #define ST25DV_EH_CTRL_DYN_REG 0x2002 |
DiegoOstuni | 0:bea5dbf3f7d5 | 474 | /** @brief ST25DV RF management dynamic register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 475 | #define ST25DV_RF_MNGT_DYN_REG 0x2003 |
DiegoOstuni | 0:bea5dbf3f7d5 | 476 | /** @brief ST25DV I2C secure session opened dynamic register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 477 | #define ST25DV_I2C_SSO_DYN_REG 0x2004 |
DiegoOstuni | 0:bea5dbf3f7d5 | 478 | /** @brief ST25DV Interrupt status dynamic register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 479 | #define ST25DV_ITSTS_DYN_REG 0x2005 |
DiegoOstuni | 0:bea5dbf3f7d5 | 480 | /** @brief ST25DV Mailbox control dynamic register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 481 | #define ST25DV_MB_CTRL_DYN_REG 0x2006 |
DiegoOstuni | 0:bea5dbf3f7d5 | 482 | /** @brief ST25DV Mailbox message length dynamic register address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 483 | #define ST25DV_MBLEN_DYN_REG 0x2007 |
DiegoOstuni | 0:bea5dbf3f7d5 | 484 | /** @brief ST25DV Mailbox buffer address. */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 485 | #define ST25DV_MAILBOX_RAM_REG 0x2008 |
DiegoOstuni | 0:bea5dbf3f7d5 | 486 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 487 | /* Registers fields definitions */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 488 | /* MB_MODE */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 489 | #define ST25DV_MB_MODE_RW_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 490 | #define ST25DV_MB_MODE_RW_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 491 | #define ST25DV_MB_MODE_RW_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 492 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 493 | /* MB_LEN_Dyn */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 494 | #define ST25DV_MBLEN_DYN_MBLEN_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 495 | #define ST25DV_MBLEN_DYN_MBLEN_FIELD 0x00 |
DiegoOstuni | 0:bea5dbf3f7d5 | 496 | #define ST25DV_MBLEN_DYN_MBLEN_MASK 0xFF |
DiegoOstuni | 0:bea5dbf3f7d5 | 497 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 498 | /* MB_CTRL_Dyn */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 499 | #define ST25DV_MB_CTRL_DYN_MBEN_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 500 | #define ST25DV_MB_CTRL_DYN_MBEN_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 501 | #define ST25DV_MB_CTRL_DYN_MBEN_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 502 | #define ST25DV_MB_CTRL_DYN_HOSTPUTMSG_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 503 | #define ST25DV_MB_CTRL_DYN_HOSTPUTMSG_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 504 | #define ST25DV_MB_CTRL_DYN_HOSTPUTMSG_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 505 | #define ST25DV_MB_CTRL_DYN_RFPUTMSG_SHIFT (2) |
DiegoOstuni | 0:bea5dbf3f7d5 | 506 | #define ST25DV_MB_CTRL_DYN_RFPUTMSG_FIELD 0xFB |
DiegoOstuni | 0:bea5dbf3f7d5 | 507 | #define ST25DV_MB_CTRL_DYN_RFPUTMSG_MASK 0x04 |
DiegoOstuni | 0:bea5dbf3f7d5 | 508 | #define ST25DV_MB_CTRL_DYN_STRESERVED_SHIFT (3) |
DiegoOstuni | 0:bea5dbf3f7d5 | 509 | #define ST25DV_MB_CTRL_DYN_STRESERVED_FIELD 0xF7 |
DiegoOstuni | 0:bea5dbf3f7d5 | 510 | #define ST25DV_MB_CTRL_DYN_STRESERVED_MASK 0x08 |
DiegoOstuni | 0:bea5dbf3f7d5 | 511 | #define ST25DV_MB_CTRL_DYN_HOSTMISSMSG_SHIFT (4) |
DiegoOstuni | 0:bea5dbf3f7d5 | 512 | #define ST25DV_MB_CTRL_DYN_HOSTMISSMSG_FIELD 0xEF |
DiegoOstuni | 0:bea5dbf3f7d5 | 513 | #define ST25DV_MB_CTRL_DYN_HOSTMISSMSG_MASK 0x10 |
DiegoOstuni | 0:bea5dbf3f7d5 | 514 | #define ST25DV_MB_CTRL_DYN_RFMISSMSG_SHIFT (5) |
DiegoOstuni | 0:bea5dbf3f7d5 | 515 | #define ST25DV_MB_CTRL_DYN_RFMISSMSG_FIELD 0xDF |
DiegoOstuni | 0:bea5dbf3f7d5 | 516 | #define ST25DV_MB_CTRL_DYN_RFMISSMSG_MASK 0x20 |
DiegoOstuni | 0:bea5dbf3f7d5 | 517 | #define ST25DV_MB_CTRL_DYN_CURRENTMSG_SHIFT (6) |
DiegoOstuni | 0:bea5dbf3f7d5 | 518 | #define ST25DV_MB_CTRL_DYN_CURRENTMSG_FIELD 0x3F |
DiegoOstuni | 0:bea5dbf3f7d5 | 519 | #define ST25DV_MB_CTRL_DYN_CURRENTMSG_MASK 0xC0 |
DiegoOstuni | 0:bea5dbf3f7d5 | 520 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 521 | /* MB_WDG */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 522 | #define ST25DV_MB_WDG_DELAY_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 523 | #define ST25DV_MB_WDG_DELAY_FIELD 0xF8 |
DiegoOstuni | 0:bea5dbf3f7d5 | 524 | #define ST25DV_MB_WDG_DELAY_MASK 0x07 |
DiegoOstuni | 0:bea5dbf3f7d5 | 525 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 526 | /* GPO */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 527 | #define ST25DV_GPO_RFUSERSTATE_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 528 | #define ST25DV_GPO_RFUSERSTATE_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 529 | #define ST25DV_GPO_RFUSERSTATE_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 530 | #define ST25DV_GPO_RFACTIVITY_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 531 | #define ST25DV_GPO_RFACTIVITY_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 532 | #define ST25DV_GPO_RFACTIVITY_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 533 | #define ST25DV_GPO_RFINTERRUPT_SHIFT (2) |
DiegoOstuni | 0:bea5dbf3f7d5 | 534 | #define ST25DV_GPO_RFINTERRUPT_FIELD 0xFB |
DiegoOstuni | 0:bea5dbf3f7d5 | 535 | #define ST25DV_GPO_RFINTERRUPT_MASK 0x04 |
DiegoOstuni | 0:bea5dbf3f7d5 | 536 | #define ST25DV_GPO_FIELDCHANGE_SHIFT (3) |
DiegoOstuni | 0:bea5dbf3f7d5 | 537 | #define ST25DV_GPO_FIELDCHANGE_FIELD 0xF7 |
DiegoOstuni | 0:bea5dbf3f7d5 | 538 | #define ST25DV_GPO_FIELDCHANGE_MASK 0x08 |
DiegoOstuni | 0:bea5dbf3f7d5 | 539 | #define ST25DV_GPO_RFPUTMSG_SHIFT (4) |
DiegoOstuni | 0:bea5dbf3f7d5 | 540 | #define ST25DV_GPO_RFPUTMSG_FIELD 0xEF |
DiegoOstuni | 0:bea5dbf3f7d5 | 541 | #define ST25DV_GPO_RFPUTMSG_MASK 0x10 |
DiegoOstuni | 0:bea5dbf3f7d5 | 542 | #define ST25DV_GPO_RFGETMSG_SHIFT (5) |
DiegoOstuni | 0:bea5dbf3f7d5 | 543 | #define ST25DV_GPO_RFGETMSG_FIELD 0xDF |
DiegoOstuni | 0:bea5dbf3f7d5 | 544 | #define ST25DV_GPO_RFGETMSG_MASK 0x20 |
DiegoOstuni | 0:bea5dbf3f7d5 | 545 | #define ST25DV_GPO_RFWRITE_SHIFT (6) |
DiegoOstuni | 0:bea5dbf3f7d5 | 546 | #define ST25DV_GPO_RFWRITE_FIELD 0xBF |
DiegoOstuni | 0:bea5dbf3f7d5 | 547 | #define ST25DV_GPO_RFWRITE_MASK 0x40 |
DiegoOstuni | 0:bea5dbf3f7d5 | 548 | #define ST25DV_GPO_ENABLE_SHIFT (7) |
DiegoOstuni | 0:bea5dbf3f7d5 | 549 | #define ST25DV_GPO_ENABLE_FIELD 0x7F |
DiegoOstuni | 0:bea5dbf3f7d5 | 550 | #define ST25DV_GPO_ENABLE_MASK 0x80 |
DiegoOstuni | 0:bea5dbf3f7d5 | 551 | #define ST25DV_GPO_ALL_MASK 0xFF |
DiegoOstuni | 0:bea5dbf3f7d5 | 552 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 553 | /* GPO_Dyn */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 554 | #define ST25DV_GPO_DYN_RFUSERSTATE_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 555 | #define ST25DV_GPO_DYN_RFUSERSTATE_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 556 | #define ST25DV_GPO_DYN_RFUSERSTATE_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 557 | #define ST25DV_GPO_DYN_RFACTIVITY_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 558 | #define ST25DV_GPO_DYN_RFACTIVITY_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 559 | #define ST25DV_GPO_DYN_RFACTIVITY_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 560 | #define ST25DV_GPO_DYN_RFINTERRUPT_SHIFT (2) |
DiegoOstuni | 0:bea5dbf3f7d5 | 561 | #define ST25DV_GPO_DYN_RFINTERRUPT_FIELD 0xFB |
DiegoOstuni | 0:bea5dbf3f7d5 | 562 | #define ST25DV_GPO_DYN_RFINTERRUPT_MASK 0x04 |
DiegoOstuni | 0:bea5dbf3f7d5 | 563 | #define ST25DV_GPO_DYN_FIELDCHANGE_SHIFT (3) |
DiegoOstuni | 0:bea5dbf3f7d5 | 564 | #define ST25DV_GPO_DYN_FIELDCHANGE_FIELD 0xF7 |
DiegoOstuni | 0:bea5dbf3f7d5 | 565 | #define ST25DV_GPO_DYN_FIELDCHANGE_MASK 0x08 |
DiegoOstuni | 0:bea5dbf3f7d5 | 566 | #define ST25DV_GPO_DYN_RFPUTMSG_SHIFT (4) |
DiegoOstuni | 0:bea5dbf3f7d5 | 567 | #define ST25DV_GPO_DYN_RFPUTMSG_FIELD 0xEF |
DiegoOstuni | 0:bea5dbf3f7d5 | 568 | #define ST25DV_GPO_DYN_RFPUTMSG_MASK 0x10 |
DiegoOstuni | 0:bea5dbf3f7d5 | 569 | #define ST25DV_GPO_DYN_RFGETMSG_SHIFT (5) |
DiegoOstuni | 0:bea5dbf3f7d5 | 570 | #define ST25DV_GPO_DYN_RFGETMSG_FIELD 0xDF |
DiegoOstuni | 0:bea5dbf3f7d5 | 571 | #define ST25DV_GPO_DYN_RFGETMSG_MASK 0x20 |
DiegoOstuni | 0:bea5dbf3f7d5 | 572 | #define ST25DV_GPO_DYN_RFWRITE_SHIFT (6) |
DiegoOstuni | 0:bea5dbf3f7d5 | 573 | #define ST25DV_GPO_DYN_RFWRITE_FIELD 0xBF |
DiegoOstuni | 0:bea5dbf3f7d5 | 574 | #define ST25DV_GPO_DYN_RFWRITE_MASK 0x40 |
DiegoOstuni | 0:bea5dbf3f7d5 | 575 | #define ST25DV_GPO_DYN_ENABLE_SHIFT (7) |
DiegoOstuni | 0:bea5dbf3f7d5 | 576 | #define ST25DV_GPO_DYN_ENABLE_FIELD 0x7F |
DiegoOstuni | 0:bea5dbf3f7d5 | 577 | #define ST25DV_GPO_DYN_ENABLE_MASK 0x80 |
DiegoOstuni | 0:bea5dbf3f7d5 | 578 | #define ST25DV_GPO_DYN_ALL_MASK 0xFF |
DiegoOstuni | 0:bea5dbf3f7d5 | 579 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 580 | /* ITTIME */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 581 | #define ST25DV_ITTIME_DELAY_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 582 | #define ST25DV_ITTIME_DELAY_FIELD 0xFC |
DiegoOstuni | 0:bea5dbf3f7d5 | 583 | #define ST25DV_ITTIME_DELAY_MASK 0x03 |
DiegoOstuni | 0:bea5dbf3f7d5 | 584 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 585 | /* ITSTS_Dyn */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 586 | #define ST25DV_ITSTS_RFUSERSTATE_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 587 | #define ST25DV_ITSTS_RFUSERSTATE_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 588 | #define ST25DV_ITSTS_RFUSERSTATE_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 589 | #define ST25DV_ITSTS_RFACTIVITY_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 590 | #define ST25DV_ITSTS_RFACTIVITY_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 591 | #define ST25DV_ITSTS_RFACTIVITY_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 592 | #define ST25DV_ITSTS_RFINTERRUPT_SHIFT (2) |
DiegoOstuni | 0:bea5dbf3f7d5 | 593 | #define ST25DV_ITSTS_RFINTERRUPT_FIELD 0xFB |
DiegoOstuni | 0:bea5dbf3f7d5 | 594 | #define ST25DV_ITSTS_RFINTERRUPT_MASK 0x04 |
DiegoOstuni | 0:bea5dbf3f7d5 | 595 | #define ST25DV_ITSTS_FIELDFALLING_SHIFT (3) |
DiegoOstuni | 0:bea5dbf3f7d5 | 596 | #define ST25DV_ITSTS_FIELDFALLING_FIELD 0xF7 |
DiegoOstuni | 0:bea5dbf3f7d5 | 597 | #define ST25DV_ITSTS_FIELDFALLING_MASK 0x08 |
DiegoOstuni | 0:bea5dbf3f7d5 | 598 | #define ST25DV_ITSTS_FIELDRISING_SHIFT (4) |
DiegoOstuni | 0:bea5dbf3f7d5 | 599 | #define ST25DV_ITSTS_FIELDRISING_FIELD 0xEF |
DiegoOstuni | 0:bea5dbf3f7d5 | 600 | #define ST25DV_ITSTS_FIELDRISING_MASK 0x10 |
DiegoOstuni | 0:bea5dbf3f7d5 | 601 | #define ST25DV_ITSTS_RFPUTMSG_SHIFT (5) |
DiegoOstuni | 0:bea5dbf3f7d5 | 602 | #define ST25DV_ITSTS_RFPUTMSG_FIELD 0xDF |
DiegoOstuni | 0:bea5dbf3f7d5 | 603 | #define ST25DV_ITSTS_RFPUTMSG_MASK 0x20 |
DiegoOstuni | 0:bea5dbf3f7d5 | 604 | #define ST25DV_ITSTS_RFGETMSG_SHIFT (6) |
DiegoOstuni | 0:bea5dbf3f7d5 | 605 | #define ST25DV_ITSTS_RFGETMSG_FIELD 0xBF |
DiegoOstuni | 0:bea5dbf3f7d5 | 606 | #define ST25DV_ITSTS_RFGETMSG_MASK 0x40 |
DiegoOstuni | 0:bea5dbf3f7d5 | 607 | #define ST25DV_ITSTS_RFWRITE_SHIFT (7) |
DiegoOstuni | 0:bea5dbf3f7d5 | 608 | #define ST25DV_ITSTS_RFWRITE_FIELD 0x7F |
DiegoOstuni | 0:bea5dbf3f7d5 | 609 | #define ST25DV_ITSTS_RFWRITE_MASK 0x80 |
DiegoOstuni | 0:bea5dbf3f7d5 | 610 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 611 | /* EH_MODE */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 612 | #define ST25DV_EH_MODE_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 613 | #define ST25DV_EH_MODE_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 614 | #define ST25DV_EH_MODE_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 615 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 616 | /* EH_CTRL_Dyn */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 617 | #define ST25DV_EH_CTRL_DYN_EH_EN_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 618 | #define ST25DV_EH_CTRL_DYN_EH_EN_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 619 | #define ST25DV_EH_CTRL_DYN_EH_EN_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 620 | #define ST25DV_EH_CTRL_DYN_EH_ON_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 621 | #define ST25DV_EH_CTRL_DYN_EH_ON_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 622 | #define ST25DV_EH_CTRL_DYN_EH_ON_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 623 | #define ST25DV_EH_CTRL_DYN_FIELD_ON_SHIFT (2) |
DiegoOstuni | 0:bea5dbf3f7d5 | 624 | #define ST25DV_EH_CTRL_DYN_FIELD_ON_FIELD 0xFB |
DiegoOstuni | 0:bea5dbf3f7d5 | 625 | #define ST25DV_EH_CTRL_DYN_FIELD_ON_MASK 0x04 |
DiegoOstuni | 0:bea5dbf3f7d5 | 626 | #define ST25DV_EH_CTRL_DYN_VCC_ON_SHIFT (3) |
DiegoOstuni | 0:bea5dbf3f7d5 | 627 | #define ST25DV_EH_CTRL_DYN_VCC_ON_FIELD 0xF7 |
DiegoOstuni | 0:bea5dbf3f7d5 | 628 | #define ST25DV_EH_CTRL_DYN_VCC_ON_MASK 0x08 |
DiegoOstuni | 0:bea5dbf3f7d5 | 629 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 630 | /* RF_MNGT */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 631 | #define ST25DV_RF_MNGT_RFDIS_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 632 | #define ST25DV_RF_MNGT_RFDIS_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 633 | #define ST25DV_RF_MNGT_RFDIS_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 634 | #define ST25DV_RF_MNGT_RFSLEEP_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 635 | #define ST25DV_RF_MNGT_RFSLEEP_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 636 | #define ST25DV_RF_MNGT_RFSLEEP_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 637 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 638 | /* RF_MNGT_Dyn */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 639 | #define ST25DV_RF_MNGT_DYN_RFDIS_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 640 | #define ST25DV_RF_MNGT_DYN_RFDIS_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 641 | #define ST25DV_RF_MNGT_DYN_RFDIS_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 642 | #define ST25DV_RF_MNGT_DYN_RFSLEEP_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 643 | #define ST25DV_RF_MNGT_DYN_RFSLEEP_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 644 | #define ST25DV_RF_MNGT_DYN_RFSLEEP_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 645 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 646 | /* RFZSS */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 647 | #define ST25DV_RFZSS_PWDCTRL_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 648 | #define ST25DV_RFZSS_PWDCTRL_FIELD 0xFC |
DiegoOstuni | 0:bea5dbf3f7d5 | 649 | #define ST25DV_RFZSS_PWDCTRL_MASK 0x03 |
DiegoOstuni | 0:bea5dbf3f7d5 | 650 | #define ST25DV_RFZSS_RWPROT_SHIFT (2) |
DiegoOstuni | 0:bea5dbf3f7d5 | 651 | #define ST25DV_RFZSS_RWPROT_FIELD 0xF3 |
DiegoOstuni | 0:bea5dbf3f7d5 | 652 | #define ST25DV_RFZSS_RWPROT_MASK 0x0C |
DiegoOstuni | 0:bea5dbf3f7d5 | 653 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 654 | /* I2CZSS */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 655 | #define ST25DV_I2CZSS_PZ1_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 656 | #define ST25DV_I2CZSS_PZ1_FIELD 0xFC |
DiegoOstuni | 0:bea5dbf3f7d5 | 657 | #define ST25DV_I2CZSS_PZ1_MASK 0x03 |
DiegoOstuni | 0:bea5dbf3f7d5 | 658 | #define ST25DV_I2CZSS_PZ2_SHIFT (2) |
DiegoOstuni | 0:bea5dbf3f7d5 | 659 | #define ST25DV_I2CZSS_PZ2_FIELD 0xF3 |
DiegoOstuni | 0:bea5dbf3f7d5 | 660 | #define ST25DV_I2CZSS_PZ2_MASK 0x0C |
DiegoOstuni | 0:bea5dbf3f7d5 | 661 | #define ST25DV_I2CZSS_PZ3_SHIFT (4) |
DiegoOstuni | 0:bea5dbf3f7d5 | 662 | #define ST25DV_I2CZSS_PZ3_FIELD 0xCF |
DiegoOstuni | 0:bea5dbf3f7d5 | 663 | #define ST25DV_I2CZSS_PZ3_MASK 0x30 |
DiegoOstuni | 0:bea5dbf3f7d5 | 664 | #define ST25DV_I2CZSS_PZ4_SHIFT (6) |
DiegoOstuni | 0:bea5dbf3f7d5 | 665 | #define ST25DV_I2CZSS_PZ4_FIELD 0x3F |
DiegoOstuni | 0:bea5dbf3f7d5 | 666 | #define ST25DV_I2CZSS_PZ4_MASK 0xC0 |
DiegoOstuni | 0:bea5dbf3f7d5 | 667 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 668 | /* LOCKCCFILE */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 669 | #define ST25DV_LOCKCCFILE_BLCK0_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 670 | #define ST25DV_LOCKCCFILE_BLCK0_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 671 | #define ST25DV_LOCKCCFILE_BLCK0_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 672 | #define ST25DV_LOCKCCFILE_BLCK1_SHIFT (1) |
DiegoOstuni | 0:bea5dbf3f7d5 | 673 | #define ST25DV_LOCKCCFILE_BLCK1_FIELD 0xFD |
DiegoOstuni | 0:bea5dbf3f7d5 | 674 | #define ST25DV_LOCKCCFILE_BLCK1_MASK 0x02 |
DiegoOstuni | 0:bea5dbf3f7d5 | 675 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 676 | /* LOCKCFG */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 677 | #define ST25DV_LOCKCFG_B0_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 678 | #define ST25DV_LOCKCFG_B0_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 679 | #define ST25DV_LOCKCFG_B0_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 680 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 681 | /* I2C_SSO_Dyn */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 682 | #define ST25DV_I2C_SSO_DYN_I2CSSO_SHIFT (0) |
DiegoOstuni | 0:bea5dbf3f7d5 | 683 | #define ST25DV_I2C_SSO_DYN_I2CSSO_FIELD 0xFE |
DiegoOstuni | 0:bea5dbf3f7d5 | 684 | #define ST25DV_I2C_SSO_DYN_I2CSSO_MASK 0x01 |
DiegoOstuni | 0:bea5dbf3f7d5 | 685 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 686 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 687 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 688 | /* External variables --------------------------------------------------------*/ |
DiegoOstuni | 0:bea5dbf3f7d5 | 689 | /* NFCTAG driver structure */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 690 | extern NFCTAG_DrvTypeDef St25Dv_i2c_Drv; |
DiegoOstuni | 0:bea5dbf3f7d5 | 691 | extern NFCTAG_ExtDrvTypeDef St25Dv_i2c_ExtDrv; |
DiegoOstuni | 0:bea5dbf3f7d5 | 692 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 693 | /* Exported macro ------------------------------------------------------------*/ |
DiegoOstuni | 0:bea5dbf3f7d5 | 694 | /* Imported functions ------------------------------------------------------- */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 695 | extern NFCTAG_StatusTypeDef ST25DV_IO_Init( I2C* mi2cChannel, DigitalOut *mLPD ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 696 | extern NFCTAG_StatusTypeDef ST25DV_IO_MemWrite( const uint8_t * const pData, const uint8_t DevAddr, const uint16_t TarAddr, const uint16_t Size, I2C* mi2cChannel ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 697 | extern NFCTAG_StatusTypeDef ST25DV_IO_Write( const uint8_t * const pData, const uint8_t DevAddr, const uint16_t Size, I2C* mi2cChannel ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 698 | extern NFCTAG_StatusTypeDef ST25DV_IO_MemRead( uint8_t * const pData, const uint8_t DevAddr, const uint16_t TarAddr, const uint16_t Size, I2C* mi2cChannel ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 699 | extern NFCTAG_StatusTypeDef ST25DV_IO_Read( uint8_t * const pData, const uint8_t DevAddr, const uint16_t Size, I2C* mi2cChannel ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 700 | extern uint8_t ST25DV_IO_IsNacked( void ); |
DiegoOstuni | 0:bea5dbf3f7d5 | 701 | extern NFCTAG_StatusTypeDef ST25DV_IO_IsDeviceReady( const uint8_t DevAddr, const uint32_t Trials, I2C* mi2cChannel); |
DiegoOstuni | 0:bea5dbf3f7d5 | 702 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 703 | /* Exported functions ------------------------------------------------------- */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 704 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 705 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 706 | * @} |
DiegoOstuni | 0:bea5dbf3f7d5 | 707 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 708 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 709 | /** |
DiegoOstuni | 0:bea5dbf3f7d5 | 710 | * @} |
DiegoOstuni | 0:bea5dbf3f7d5 | 711 | */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 712 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 713 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 714 | #endif /* __ST25DV_H */ |
DiegoOstuni | 0:bea5dbf3f7d5 | 715 | |
DiegoOstuni | 0:bea5dbf3f7d5 | 716 | /******************* (C) COPYRIGHT 2016 STMicroelectronics *****END OF FILE****/ |