BSP library for the STMicroelectronics X-NUCLEO-NFC04A1
Dependents: mbed-os-nfc04a1 Wiagro-Lanza34-XDot
x_nucleo_nfc04a1.h@0:cf62b690f57c, 2019-11-14 (annotated)
- Committer:
- DiegoOstuni
- Date:
- Thu Nov 14 10:30:13 2019 +0000
- Revision:
- 0:cf62b690f57c
Files added
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DiegoOstuni | 0:cf62b690f57c | 1 | /** |
DiegoOstuni | 0:cf62b690f57c | 2 | ****************************************************************************** |
DiegoOstuni | 0:cf62b690f57c | 3 | * @file x_nucleo_nfc04a1.h |
DiegoOstuni | 0:cf62b690f57c | 4 | * @author MMY Application Team |
DiegoOstuni | 0:cf62b690f57c | 5 | * @version $Revision: 3351 $ |
DiegoOstuni | 0:cf62b690f57c | 6 | * @date $Date: 2017-01-25 17:28:08 +0100 (Wed, 25 Jan 2017) $ |
DiegoOstuni | 0:cf62b690f57c | 7 | * @brief This file contains definitions for the x_nucleo_nfc04a1.c |
DiegoOstuni | 0:cf62b690f57c | 8 | * board specific functions. |
DiegoOstuni | 0:cf62b690f57c | 9 | ****************************************************************************** |
DiegoOstuni | 0:cf62b690f57c | 10 | * @attention |
DiegoOstuni | 0:cf62b690f57c | 11 | * |
DiegoOstuni | 0:cf62b690f57c | 12 | * <h2><center>© COPYRIGHT 2017 STMicroelectronics</center></h2> |
DiegoOstuni | 0:cf62b690f57c | 13 | * |
DiegoOstuni | 0:cf62b690f57c | 14 | * Licensed under ST MYLIBERTY SOFTWARE LICENSE AGREEMENT (the "License"); |
DiegoOstuni | 0:cf62b690f57c | 15 | * You may not use this file except in compliance with the License. |
DiegoOstuni | 0:cf62b690f57c | 16 | * You may obtain a copy of the License at: |
DiegoOstuni | 0:cf62b690f57c | 17 | * |
DiegoOstuni | 0:cf62b690f57c | 18 | * http://www.st.com/myliberty |
DiegoOstuni | 0:cf62b690f57c | 19 | * |
DiegoOstuni | 0:cf62b690f57c | 20 | * Unless required by applicable law or agreed to in writing, software |
DiegoOstuni | 0:cf62b690f57c | 21 | * distributed under the License is distributed on an "AS IS" BASIS, |
DiegoOstuni | 0:cf62b690f57c | 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, |
DiegoOstuni | 0:cf62b690f57c | 23 | * AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY, |
DiegoOstuni | 0:cf62b690f57c | 24 | * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. |
DiegoOstuni | 0:cf62b690f57c | 25 | * See the License for the specific language governing permissions and |
DiegoOstuni | 0:cf62b690f57c | 26 | * limitations under the License. |
DiegoOstuni | 0:cf62b690f57c | 27 | * |
DiegoOstuni | 0:cf62b690f57c | 28 | ****************************************************************************** |
DiegoOstuni | 0:cf62b690f57c | 29 | */ |
DiegoOstuni | 0:cf62b690f57c | 30 | |
DiegoOstuni | 0:cf62b690f57c | 31 | #include "x_nucleo_nfc04a1_nfctag.h" |
DiegoOstuni | 0:cf62b690f57c | 32 | #include "x_nucleo_nfc04.h" |
DiegoOstuni | 0:cf62b690f57c | 33 | #include "mbed.h" |
DiegoOstuni | 0:cf62b690f57c | 34 | //#include "PinNames.h" |
DiegoOstuni | 0:cf62b690f57c | 35 | |
DiegoOstuni | 0:cf62b690f57c | 36 | /* Define to prevent recursive inclusion -------------------------------------*/ |
DiegoOstuni | 0:cf62b690f57c | 37 | #ifndef __X_NUCLEO_NFC04A1_H |
DiegoOstuni | 0:cf62b690f57c | 38 | #define __X_NUCLEO_NFC04A1_H |
DiegoOstuni | 0:cf62b690f57c | 39 | |
DiegoOstuni | 0:cf62b690f57c | 40 | |
DiegoOstuni | 0:cf62b690f57c | 41 | |
DiegoOstuni | 0:cf62b690f57c | 42 | /* Includes ------------------------------------------------------------------*/ |
DiegoOstuni | 0:cf62b690f57c | 43 | //#include "ST25DV/st25dv.h" |
DiegoOstuni | 0:cf62b690f57c | 44 | |
DiegoOstuni | 0:cf62b690f57c | 45 | /** @addtogroup BSP |
DiegoOstuni | 0:cf62b690f57c | 46 | * @{ |
DiegoOstuni | 0:cf62b690f57c | 47 | */ |
DiegoOstuni | 0:cf62b690f57c | 48 | |
DiegoOstuni | 0:cf62b690f57c | 49 | /** @addtogroup X_NUCLEO_NFC04A1 |
DiegoOstuni | 0:cf62b690f57c | 50 | * @{ |
DiegoOstuni | 0:cf62b690f57c | 51 | */ |
DiegoOstuni | 0:cf62b690f57c | 52 | |
DiegoOstuni | 0:cf62b690f57c | 53 | /* Exported types ------------------------------------------------------------*/ |
DiegoOstuni | 0:cf62b690f57c | 54 | /** @defgroup X_NUCLEO_NFC04A1_Exported_Types |
DiegoOstuni | 0:cf62b690f57c | 55 | * @{ |
DiegoOstuni | 0:cf62b690f57c | 56 | */ |
DiegoOstuni | 0:cf62b690f57c | 57 | /** |
DiegoOstuni | 0:cf62b690f57c | 58 | * @brief NFC04A1 Led enumerator definition |
DiegoOstuni | 0:cf62b690f57c | 59 | */ |
DiegoOstuni | 0:cf62b690f57c | 60 | typedef enum |
DiegoOstuni | 0:cf62b690f57c | 61 | { |
DiegoOstuni | 0:cf62b690f57c | 62 | GREEN_LED = 0, |
DiegoOstuni | 0:cf62b690f57c | 63 | BLUE_LED , |
DiegoOstuni | 0:cf62b690f57c | 64 | YELLOW_LED |
DiegoOstuni | 0:cf62b690f57c | 65 | }NFC04A1_Led_E; |
DiegoOstuni | 0:cf62b690f57c | 66 | |
DiegoOstuni | 0:cf62b690f57c | 67 | /** |
DiegoOstuni | 0:cf62b690f57c | 68 | * @brief NFC04A1 Ack Nack enumerator definition |
DiegoOstuni | 0:cf62b690f57c | 69 | */ |
DiegoOstuni | 0:cf62b690f57c | 70 | typedef enum |
DiegoOstuni | 0:cf62b690f57c | 71 | { |
DiegoOstuni | 0:cf62b690f57c | 72 | I2CANSW_ACK = 0, |
DiegoOstuni | 0:cf62b690f57c | 73 | I2CANSW_NACK |
DiegoOstuni | 0:cf62b690f57c | 74 | }NFC04A1_I2CANSW_E; |
DiegoOstuni | 0:cf62b690f57c | 75 | |
DiegoOstuni | 0:cf62b690f57c | 76 | |
DiegoOstuni | 0:cf62b690f57c | 77 | |
DiegoOstuni | 0:cf62b690f57c | 78 | /** |
DiegoOstuni | 0:cf62b690f57c | 79 | * @brief NFC04A1 Led structure definition |
DiegoOstuni | 0:cf62b690f57c | 80 | */ |
DiegoOstuni | 0:cf62b690f57c | 81 | |
DiegoOstuni | 0:cf62b690f57c | 82 | typedef struct |
DiegoOstuni | 0:cf62b690f57c | 83 | { |
DiegoOstuni | 0:cf62b690f57c | 84 | uint16_t NFC04A1_LED_PIN; |
DiegoOstuni | 0:cf62b690f57c | 85 | }NFC04A1_Led_TypeDef; |
DiegoOstuni | 0:cf62b690f57c | 86 | |
DiegoOstuni | 0:cf62b690f57c | 87 | /** |
DiegoOstuni | 0:cf62b690f57c | 88 | * @} |
DiegoOstuni | 0:cf62b690f57c | 89 | */ |
DiegoOstuni | 0:cf62b690f57c | 90 | /* Exported constants --------------------------------------------------------*/ |
DiegoOstuni | 0:cf62b690f57c | 91 | /** @defgroup X_NUCLEO_NFC04A1_Exported_Constants |
DiegoOstuni | 0:cf62b690f57c | 92 | * @{ |
DiegoOstuni | 0:cf62b690f57c | 93 | */ |
DiegoOstuni | 0:cf62b690f57c | 94 | #define ST25DV_I2C_SPEED NFC04A1_ST25DV_I2C_SPEED_1M |
DiegoOstuni | 0:cf62b690f57c | 95 | #define NFC04A1_I2C_TIMEOUT ST25DV_I2C_TIMEOUT |
DiegoOstuni | 0:cf62b690f57c | 96 | /** |
DiegoOstuni | 0:cf62b690f57c | 97 | * @} |
DiegoOstuni | 0:cf62b690f57c | 98 | */ |
DiegoOstuni | 0:cf62b690f57c | 99 | |
DiegoOstuni | 0:cf62b690f57c | 100 | /* External variables --------------------------------------------------------*/ |
DiegoOstuni | 0:cf62b690f57c | 101 | /* Exported macro ------------------------------------------------------------*/ |
DiegoOstuni | 0:cf62b690f57c | 102 | /* Exported functions ------------------------------------------------------- */ |
DiegoOstuni | 0:cf62b690f57c | 103 | /** @defgroup ST25DV_NUCLEO_Exported_Functions |
DiegoOstuni | 0:cf62b690f57c | 104 | * @{ |
DiegoOstuni | 0:cf62b690f57c | 105 | */ |
DiegoOstuni | 0:cf62b690f57c | 106 | void NFC04A1_LED_Toggle( DigitalOut* led); |
DiegoOstuni | 0:cf62b690f57c | 107 | DigitalOut NFC04A1_GPO_ReadPin( DigitalOut *mMISO ); |
DiegoOstuni | 0:cf62b690f57c | 108 | void NFC04A1_LPD_Init( DigitalOut *mLPD ); |
DiegoOstuni | 0:cf62b690f57c | 109 | uint8_t NFC04A1_LPD_ReadPin( void ); |
DiegoOstuni | 0:cf62b690f57c | 110 | void NFC04A1_LPD_WritePin( uint8_t LpdPinState, DigitalOut *mLPD ); |
DiegoOstuni | 0:cf62b690f57c | 111 | void NFC04A1_SelectI2cSpeed( uint8_t i2cspeedchoice, I2C* mi2cChannel); |
DiegoOstuni | 0:cf62b690f57c | 112 | /** |
DiegoOstuni | 0:cf62b690f57c | 113 | * @} |
DiegoOstuni | 0:cf62b690f57c | 114 | */ |
DiegoOstuni | 0:cf62b690f57c | 115 | |
DiegoOstuni | 0:cf62b690f57c | 116 | /** |
DiegoOstuni | 0:cf62b690f57c | 117 | * @} |
DiegoOstuni | 0:cf62b690f57c | 118 | */ |
DiegoOstuni | 0:cf62b690f57c | 119 | |
DiegoOstuni | 0:cf62b690f57c | 120 | /** |
DiegoOstuni | 0:cf62b690f57c | 121 | * @} |
DiegoOstuni | 0:cf62b690f57c | 122 | */ |
DiegoOstuni | 0:cf62b690f57c | 123 | |
DiegoOstuni | 0:cf62b690f57c | 124 | |
DiegoOstuni | 0:cf62b690f57c | 125 | |
DiegoOstuni | 0:cf62b690f57c | 126 | #endif /* __X_NUCLEO_NFC04A1_H */ |
DiegoOstuni | 0:cf62b690f57c | 127 | |
DiegoOstuni | 0:cf62b690f57c | 128 | /******************* (C) COPYRIGHT 2017 STMicroelectronics *****END OF FILE****/ |