mbed library with additional peripherals for ST F401 board
Fork of mbed-src by
This mbed LIB has additional peripherals for ST F401 board
- UART2 : PA_3 rx, PA_2 tx
- UART3 : PC_7 rx, PC_6 tx
- I2C2 : PB_3 SDA, PB_10 SCL
- I2C3 : PB_4 SDA, PA_8 SCL
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F030R8/stm32f0xx_cec.h@76:aeb1df146756, 2014-01-27 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Jan 27 14:30:07 2014 +0000
- Revision:
- 76:aeb1df146756
- Child:
- 106:ced8cbb51063
Synchronized with git revision a31ec9c5f7bcb5c8a1b2eced103f6a1dfa921abd
Full URL: https://github.com/mbedmicro/mbed/commit/a31ec9c5f7bcb5c8a1b2eced103f6a1dfa921abd/
Add NUCLEO_L152RE
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 76:aeb1df146756 | 1 | /** |
mbed_official | 76:aeb1df146756 | 2 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 3 | * @file stm32f0xx_cec.h |
mbed_official | 76:aeb1df146756 | 4 | * @author MCD Application Team |
mbed_official | 76:aeb1df146756 | 5 | * @version V1.3.0 |
mbed_official | 76:aeb1df146756 | 6 | * @date 16-January-2014 |
mbed_official | 76:aeb1df146756 | 7 | * @brief This file contains all the functions prototypes for the CEC firmware |
mbed_official | 76:aeb1df146756 | 8 | * library, applicable only for STM32F051, STM32F042 and STM32F072 devices. |
mbed_official | 76:aeb1df146756 | 9 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 10 | * @attention |
mbed_official | 76:aeb1df146756 | 11 | * |
mbed_official | 76:aeb1df146756 | 12 | * <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> |
mbed_official | 76:aeb1df146756 | 13 | * |
mbed_official | 76:aeb1df146756 | 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); |
mbed_official | 76:aeb1df146756 | 15 | * You may not use this file except in compliance with the License. |
mbed_official | 76:aeb1df146756 | 16 | * You may obtain a copy of the License at: |
mbed_official | 76:aeb1df146756 | 17 | * |
mbed_official | 76:aeb1df146756 | 18 | * http://www.st.com/software_license_agreement_liberty_v2 |
mbed_official | 76:aeb1df146756 | 19 | * |
mbed_official | 76:aeb1df146756 | 20 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 76:aeb1df146756 | 21 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 76:aeb1df146756 | 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 76:aeb1df146756 | 23 | * See the License for the specific language governing permissions and |
mbed_official | 76:aeb1df146756 | 24 | * limitations under the License. |
mbed_official | 76:aeb1df146756 | 25 | * |
mbed_official | 76:aeb1df146756 | 26 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 27 | */ |
mbed_official | 76:aeb1df146756 | 28 | |
mbed_official | 76:aeb1df146756 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 30 | #ifndef __STM32F0XX_CEC_H |
mbed_official | 76:aeb1df146756 | 31 | #define __STM32F0XX_CEC_H |
mbed_official | 76:aeb1df146756 | 32 | |
mbed_official | 76:aeb1df146756 | 33 | #ifdef __cplusplus |
mbed_official | 76:aeb1df146756 | 34 | extern "C" { |
mbed_official | 76:aeb1df146756 | 35 | #endif |
mbed_official | 76:aeb1df146756 | 36 | |
mbed_official | 76:aeb1df146756 | 37 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 38 | #include "stm32f0xx.h" |
mbed_official | 76:aeb1df146756 | 39 | |
mbed_official | 76:aeb1df146756 | 40 | /** @addtogroup STM32F0xx_StdPeriph_Driver |
mbed_official | 76:aeb1df146756 | 41 | * @{ |
mbed_official | 76:aeb1df146756 | 42 | */ |
mbed_official | 76:aeb1df146756 | 43 | |
mbed_official | 76:aeb1df146756 | 44 | /** @addtogroup CEC |
mbed_official | 76:aeb1df146756 | 45 | * @{ |
mbed_official | 76:aeb1df146756 | 46 | */ |
mbed_official | 76:aeb1df146756 | 47 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 48 | |
mbed_official | 76:aeb1df146756 | 49 | /** |
mbed_official | 76:aeb1df146756 | 50 | * @brief CEC Init structure definition |
mbed_official | 76:aeb1df146756 | 51 | */ |
mbed_official | 76:aeb1df146756 | 52 | typedef struct |
mbed_official | 76:aeb1df146756 | 53 | { |
mbed_official | 76:aeb1df146756 | 54 | uint32_t CEC_SignalFreeTime; /*!< Specifies the CEC Signal Free Time configuration. |
mbed_official | 76:aeb1df146756 | 55 | This parameter can be a value of @ref CEC_Signal_Free_Time */ |
mbed_official | 76:aeb1df146756 | 56 | uint32_t CEC_RxTolerance; /*!< Specifies the CEC Reception Tolerance. |
mbed_official | 76:aeb1df146756 | 57 | This parameter can be a value of @ref CEC_RxTolerance */ |
mbed_official | 76:aeb1df146756 | 58 | uint32_t CEC_StopReception; /*!< Specifies the CEC Stop Reception. |
mbed_official | 76:aeb1df146756 | 59 | This parameter can be a value of @ref CEC_Stop_Reception */ |
mbed_official | 76:aeb1df146756 | 60 | uint32_t CEC_BitRisingError; /*!< Specifies the CEC Bit Rising Error generation. |
mbed_official | 76:aeb1df146756 | 61 | This parameter can be a value of @ref CEC_Bit_Rising_Error_Generation */ |
mbed_official | 76:aeb1df146756 | 62 | uint32_t CEC_LongBitPeriodError; /*!< Specifies the CEC Long Bit Error generation. |
mbed_official | 76:aeb1df146756 | 63 | This parameter can be a value of @ref CEC_Long_Bit_Error_Generation */ |
mbed_official | 76:aeb1df146756 | 64 | uint32_t CEC_BRDNoGen; /*!< Specifies the CEC Broadcast Error generation. |
mbed_official | 76:aeb1df146756 | 65 | This parameter can be a value of @ref CEC_BDR_No_Gen */ |
mbed_official | 76:aeb1df146756 | 66 | uint32_t CEC_SFTOption; /*!< Specifies the CEC Signal Free Time option. |
mbed_official | 76:aeb1df146756 | 67 | This parameter can be a value of @ref CEC_SFT_Option */ |
mbed_official | 76:aeb1df146756 | 68 | |
mbed_official | 76:aeb1df146756 | 69 | }CEC_InitTypeDef; |
mbed_official | 76:aeb1df146756 | 70 | |
mbed_official | 76:aeb1df146756 | 71 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 72 | |
mbed_official | 76:aeb1df146756 | 73 | /** @defgroup CEC_Exported_Constants |
mbed_official | 76:aeb1df146756 | 74 | * @{ |
mbed_official | 76:aeb1df146756 | 75 | */ |
mbed_official | 76:aeb1df146756 | 76 | |
mbed_official | 76:aeb1df146756 | 77 | /** @defgroup CEC_Signal_Free_Time |
mbed_official | 76:aeb1df146756 | 78 | * @{ |
mbed_official | 76:aeb1df146756 | 79 | */ |
mbed_official | 76:aeb1df146756 | 80 | #define CEC_SignalFreeTime_Standard ((uint32_t)0x00000000) /*!< CEC Signal Free Time Standard */ |
mbed_official | 76:aeb1df146756 | 81 | #define CEC_SignalFreeTime_1T ((uint32_t)0x00000001) /*!< CEC 1.5 nominal data bit periods */ |
mbed_official | 76:aeb1df146756 | 82 | #define CEC_SignalFreeTime_2T ((uint32_t)0x00000002) /*!< CEC 2.5 nominal data bit periods */ |
mbed_official | 76:aeb1df146756 | 83 | #define CEC_SignalFreeTime_3T ((uint32_t)0x00000003) /*!< CEC 3.5 nominal data bit periods */ |
mbed_official | 76:aeb1df146756 | 84 | #define CEC_SignalFreeTime_4T ((uint32_t)0x00000004) /*!< CEC 4.5 nominal data bit periods */ |
mbed_official | 76:aeb1df146756 | 85 | #define CEC_SignalFreeTime_5T ((uint32_t)0x00000005) /*!< CEC 5.5 nominal data bit periods */ |
mbed_official | 76:aeb1df146756 | 86 | #define CEC_SignalFreeTime_6T ((uint32_t)0x00000006) /*!< CEC 6.5 nominal data bit periods */ |
mbed_official | 76:aeb1df146756 | 87 | #define CEC_SignalFreeTime_7T ((uint32_t)0x00000007) /*!< CEC 7.5 nominal data bit periods */ |
mbed_official | 76:aeb1df146756 | 88 | |
mbed_official | 76:aeb1df146756 | 89 | #define IS_CEC_SIGNAL_FREE_TIME(TIME) (((TIME) == CEC_SignalFreeTime_Standard) || \ |
mbed_official | 76:aeb1df146756 | 90 | ((TIME) == CEC_SignalFreeTime_1T)|| \ |
mbed_official | 76:aeb1df146756 | 91 | ((TIME) == CEC_SignalFreeTime_2T)|| \ |
mbed_official | 76:aeb1df146756 | 92 | ((TIME) == CEC_SignalFreeTime_3T)|| \ |
mbed_official | 76:aeb1df146756 | 93 | ((TIME) == CEC_SignalFreeTime_4T)|| \ |
mbed_official | 76:aeb1df146756 | 94 | ((TIME) == CEC_SignalFreeTime_5T)|| \ |
mbed_official | 76:aeb1df146756 | 95 | ((TIME) == CEC_SignalFreeTime_6T)|| \ |
mbed_official | 76:aeb1df146756 | 96 | ((TIME) == CEC_SignalFreeTime_7T)) |
mbed_official | 76:aeb1df146756 | 97 | /** |
mbed_official | 76:aeb1df146756 | 98 | * @} |
mbed_official | 76:aeb1df146756 | 99 | */ |
mbed_official | 76:aeb1df146756 | 100 | |
mbed_official | 76:aeb1df146756 | 101 | /** @defgroup CEC_RxTolerance |
mbed_official | 76:aeb1df146756 | 102 | * @{ |
mbed_official | 76:aeb1df146756 | 103 | */ |
mbed_official | 76:aeb1df146756 | 104 | #define CEC_RxTolerance_Standard ((uint32_t)0x00000000) /*!< Standard Tolerance Margin */ |
mbed_official | 76:aeb1df146756 | 105 | #define CEC_RxTolerance_Extended CEC_CFGR_RXTOL /*!< Extended Tolerance Margin */ |
mbed_official | 76:aeb1df146756 | 106 | |
mbed_official | 76:aeb1df146756 | 107 | #define IS_CEC_RX_TOLERANCE(TOLERANCE) (((TOLERANCE) == CEC_RxTolerance_Standard) || \ |
mbed_official | 76:aeb1df146756 | 108 | ((TOLERANCE) == CEC_RxTolerance_Extended)) |
mbed_official | 76:aeb1df146756 | 109 | /** |
mbed_official | 76:aeb1df146756 | 110 | * @} |
mbed_official | 76:aeb1df146756 | 111 | */ |
mbed_official | 76:aeb1df146756 | 112 | |
mbed_official | 76:aeb1df146756 | 113 | /** @defgroup CEC_Stop_Reception |
mbed_official | 76:aeb1df146756 | 114 | * @{ |
mbed_official | 76:aeb1df146756 | 115 | */ |
mbed_official | 76:aeb1df146756 | 116 | #define CEC_StopReception_Off ((uint32_t)0x00000000) /*!< No RX Stop on bit Rising Error (BRE) */ |
mbed_official | 76:aeb1df146756 | 117 | #define CEC_StopReception_On CEC_CFGR_BRESTP /*!< RX Stop on bit Rising Error (BRE) */ |
mbed_official | 76:aeb1df146756 | 118 | |
mbed_official | 76:aeb1df146756 | 119 | #define IS_CEC_STOP_RECEPTION(RECEPTION) (((RECEPTION) == CEC_StopReception_On) || \ |
mbed_official | 76:aeb1df146756 | 120 | ((RECEPTION) == CEC_StopReception_Off)) |
mbed_official | 76:aeb1df146756 | 121 | /** |
mbed_official | 76:aeb1df146756 | 122 | * @} |
mbed_official | 76:aeb1df146756 | 123 | */ |
mbed_official | 76:aeb1df146756 | 124 | |
mbed_official | 76:aeb1df146756 | 125 | /** @defgroup CEC_Bit_Rising_Error_Generation |
mbed_official | 76:aeb1df146756 | 126 | * @{ |
mbed_official | 76:aeb1df146756 | 127 | */ |
mbed_official | 76:aeb1df146756 | 128 | #define CEC_BitRisingError_Off ((uint32_t)0x00000000) /*!< Bit Rising Error generation turned Off */ |
mbed_official | 76:aeb1df146756 | 129 | #define CEC_BitRisingError_On CEC_CFGR_BREGEN /*!< Bit Rising Error generation turned On */ |
mbed_official | 76:aeb1df146756 | 130 | |
mbed_official | 76:aeb1df146756 | 131 | #define IS_CEC_BIT_RISING_ERROR(ERROR) (((ERROR) == CEC_BitRisingError_Off) || \ |
mbed_official | 76:aeb1df146756 | 132 | ((ERROR) == CEC_BitRisingError_On)) |
mbed_official | 76:aeb1df146756 | 133 | /** |
mbed_official | 76:aeb1df146756 | 134 | * @} |
mbed_official | 76:aeb1df146756 | 135 | */ |
mbed_official | 76:aeb1df146756 | 136 | |
mbed_official | 76:aeb1df146756 | 137 | /** @defgroup CEC_Long_Bit_Error_Generation |
mbed_official | 76:aeb1df146756 | 138 | * @{ |
mbed_official | 76:aeb1df146756 | 139 | */ |
mbed_official | 76:aeb1df146756 | 140 | #define CEC_LongBitPeriodError_Off ((uint32_t)0x00000000) /*!< Long Bit Period Error generation turned Off */ |
mbed_official | 76:aeb1df146756 | 141 | #define CEC_LongBitPeriodError_On CEC_CFGR_LREGEN /*!< Long Bit Period Error generation turned On */ |
mbed_official | 76:aeb1df146756 | 142 | |
mbed_official | 76:aeb1df146756 | 143 | #define IS_CEC_LONG_BIT_PERIOD_ERROR(ERROR) (((ERROR) == CEC_LongBitPeriodError_Off) || \ |
mbed_official | 76:aeb1df146756 | 144 | ((ERROR) == CEC_LongBitPeriodError_On)) |
mbed_official | 76:aeb1df146756 | 145 | /** |
mbed_official | 76:aeb1df146756 | 146 | * @} |
mbed_official | 76:aeb1df146756 | 147 | */ |
mbed_official | 76:aeb1df146756 | 148 | |
mbed_official | 76:aeb1df146756 | 149 | /** @defgroup CEC_BDR_No_Gen |
mbed_official | 76:aeb1df146756 | 150 | * @{ |
mbed_official | 76:aeb1df146756 | 151 | */ |
mbed_official | 76:aeb1df146756 | 152 | |
mbed_official | 76:aeb1df146756 | 153 | #define CEC_BRDNoGen_Off ((uint32_t)0x00000000) /*!< Broadcast Bit Rising Error generation turned Off */ |
mbed_official | 76:aeb1df146756 | 154 | #define CEC_BRDNoGen_On CEC_CFGR_BRDNOGEN /*!< Broadcast Bit Rising Error generation turned On */ |
mbed_official | 76:aeb1df146756 | 155 | |
mbed_official | 76:aeb1df146756 | 156 | #define IS_CEC_BDR_NO_GEN_ERROR(ERROR) (((ERROR) == CEC_BRDNoGen_Off) || \ |
mbed_official | 76:aeb1df146756 | 157 | ((ERROR) == CEC_BRDNoGen_On)) |
mbed_official | 76:aeb1df146756 | 158 | /** |
mbed_official | 76:aeb1df146756 | 159 | * @} |
mbed_official | 76:aeb1df146756 | 160 | */ |
mbed_official | 76:aeb1df146756 | 161 | |
mbed_official | 76:aeb1df146756 | 162 | /** @defgroup CEC_SFT_Option |
mbed_official | 76:aeb1df146756 | 163 | * @{ |
mbed_official | 76:aeb1df146756 | 164 | */ |
mbed_official | 76:aeb1df146756 | 165 | #define CEC_SFTOption_Off ((uint32_t)0x00000000) /*!< SFT option turned Off */ |
mbed_official | 76:aeb1df146756 | 166 | #define CEC_SFTOption_On CEC_CFGR_SFTOPT /*!< SFT option turned On */ |
mbed_official | 76:aeb1df146756 | 167 | |
mbed_official | 76:aeb1df146756 | 168 | #define IS_CEC_SFT_OPTION(OPTION) (((OPTION) == CEC_SFTOption_Off) || \ |
mbed_official | 76:aeb1df146756 | 169 | ((OPTION) == CEC_SFTOption_On)) |
mbed_official | 76:aeb1df146756 | 170 | /** |
mbed_official | 76:aeb1df146756 | 171 | * @} |
mbed_official | 76:aeb1df146756 | 172 | */ |
mbed_official | 76:aeb1df146756 | 173 | |
mbed_official | 76:aeb1df146756 | 174 | /** @defgroup CEC_Own_Address |
mbed_official | 76:aeb1df146756 | 175 | * @{ |
mbed_official | 76:aeb1df146756 | 176 | */ |
mbed_official | 76:aeb1df146756 | 177 | #define IS_CEC_ADDRESS(ADDRESS) ((ADDRESS) < 0x10) |
mbed_official | 76:aeb1df146756 | 178 | |
mbed_official | 76:aeb1df146756 | 179 | /** |
mbed_official | 76:aeb1df146756 | 180 | * @} |
mbed_official | 76:aeb1df146756 | 181 | */ |
mbed_official | 76:aeb1df146756 | 182 | |
mbed_official | 76:aeb1df146756 | 183 | /** @defgroup CEC_Interrupt_Configuration_definition |
mbed_official | 76:aeb1df146756 | 184 | * @{ |
mbed_official | 76:aeb1df146756 | 185 | */ |
mbed_official | 76:aeb1df146756 | 186 | #define CEC_IT_TXACKE CEC_IER_TXACKEIE |
mbed_official | 76:aeb1df146756 | 187 | #define CEC_IT_TXERR CEC_IER_TXERRIE |
mbed_official | 76:aeb1df146756 | 188 | #define CEC_IT_TXUDR CEC_IER_TXUDRIE |
mbed_official | 76:aeb1df146756 | 189 | #define CEC_IT_TXEND CEC_IER_TXENDIE |
mbed_official | 76:aeb1df146756 | 190 | #define CEC_IT_TXBR CEC_IER_TXBRIE |
mbed_official | 76:aeb1df146756 | 191 | #define CEC_IT_ARBLST CEC_IER_ARBLSTIE |
mbed_official | 76:aeb1df146756 | 192 | #define CEC_IT_RXACKE CEC_IER_RXACKEIE |
mbed_official | 76:aeb1df146756 | 193 | #define CEC_IT_LBPE CEC_IER_LBPEIE |
mbed_official | 76:aeb1df146756 | 194 | #define CEC_IT_SBPE CEC_IER_SBPEIE |
mbed_official | 76:aeb1df146756 | 195 | #define CEC_IT_BRE CEC_IER_BREIEIE |
mbed_official | 76:aeb1df146756 | 196 | #define CEC_IT_RXOVR CEC_IER_RXOVRIE |
mbed_official | 76:aeb1df146756 | 197 | #define CEC_IT_RXEND CEC_IER_RXENDIE |
mbed_official | 76:aeb1df146756 | 198 | #define CEC_IT_RXBR CEC_IER_RXBRIE |
mbed_official | 76:aeb1df146756 | 199 | |
mbed_official | 76:aeb1df146756 | 200 | #define IS_CEC_IT(IT) ((((IT) & (uint32_t)0xFFFFE000) == 0x00) && ((IT) != 0x00)) |
mbed_official | 76:aeb1df146756 | 201 | |
mbed_official | 76:aeb1df146756 | 202 | #define IS_CEC_GET_IT(IT) (((IT) == CEC_IT_TXACKE) || \ |
mbed_official | 76:aeb1df146756 | 203 | ((IT) == CEC_IT_TXERR)|| \ |
mbed_official | 76:aeb1df146756 | 204 | ((IT) == CEC_IT_TXUDR)|| \ |
mbed_official | 76:aeb1df146756 | 205 | ((IT) == CEC_IT_TXEND)|| \ |
mbed_official | 76:aeb1df146756 | 206 | ((IT) == CEC_IT_TXBR)|| \ |
mbed_official | 76:aeb1df146756 | 207 | ((IT) == CEC_IT_ARBLST)|| \ |
mbed_official | 76:aeb1df146756 | 208 | ((IT) == CEC_IT_RXACKE)|| \ |
mbed_official | 76:aeb1df146756 | 209 | ((IT) == CEC_IT_LBPE)|| \ |
mbed_official | 76:aeb1df146756 | 210 | ((IT) == CEC_IT_SBPE)|| \ |
mbed_official | 76:aeb1df146756 | 211 | ((IT) == CEC_IT_BRE)|| \ |
mbed_official | 76:aeb1df146756 | 212 | ((IT) == CEC_IT_RXOVR)|| \ |
mbed_official | 76:aeb1df146756 | 213 | ((IT) == CEC_IT_RXEND)|| \ |
mbed_official | 76:aeb1df146756 | 214 | ((IT) == CEC_IT_RXBR)) |
mbed_official | 76:aeb1df146756 | 215 | /** |
mbed_official | 76:aeb1df146756 | 216 | * @} |
mbed_official | 76:aeb1df146756 | 217 | */ |
mbed_official | 76:aeb1df146756 | 218 | |
mbed_official | 76:aeb1df146756 | 219 | /** @defgroup CEC_ISR_register_flags_definition |
mbed_official | 76:aeb1df146756 | 220 | * @{ |
mbed_official | 76:aeb1df146756 | 221 | */ |
mbed_official | 76:aeb1df146756 | 222 | #define CEC_FLAG_TXACKE CEC_ISR_TXACKE |
mbed_official | 76:aeb1df146756 | 223 | #define CEC_FLAG_TXERR CEC_ISR_TXERR |
mbed_official | 76:aeb1df146756 | 224 | #define CEC_FLAG_TXUDR CEC_ISR_TXUDR |
mbed_official | 76:aeb1df146756 | 225 | #define CEC_FLAG_TXEND CEC_ISR_TXEND |
mbed_official | 76:aeb1df146756 | 226 | #define CEC_FLAG_TXBR CEC_ISR_TXBR |
mbed_official | 76:aeb1df146756 | 227 | #define CEC_FLAG_ARBLST CEC_ISR_ARBLST |
mbed_official | 76:aeb1df146756 | 228 | #define CEC_FLAG_RXACKE CEC_ISR_RXACKE |
mbed_official | 76:aeb1df146756 | 229 | #define CEC_FLAG_LBPE CEC_ISR_LBPE |
mbed_official | 76:aeb1df146756 | 230 | #define CEC_FLAG_SBPE CEC_ISR_SBPE |
mbed_official | 76:aeb1df146756 | 231 | #define CEC_FLAG_BRE CEC_ISR_BRE |
mbed_official | 76:aeb1df146756 | 232 | #define CEC_FLAG_RXOVR CEC_ISR_RXOVR |
mbed_official | 76:aeb1df146756 | 233 | #define CEC_FLAG_RXEND CEC_ISR_RXEND |
mbed_official | 76:aeb1df146756 | 234 | #define CEC_FLAG_RXBR CEC_ISR_RXBR |
mbed_official | 76:aeb1df146756 | 235 | |
mbed_official | 76:aeb1df146756 | 236 | #define IS_CEC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFE000) == 0x00) && ((FLAG) != 0x00)) |
mbed_official | 76:aeb1df146756 | 237 | |
mbed_official | 76:aeb1df146756 | 238 | #define IS_CEC_GET_FLAG(FLAG) (((FLAG) == CEC_FLAG_TXACKE) || \ |
mbed_official | 76:aeb1df146756 | 239 | ((FLAG) == CEC_FLAG_TXERR)|| \ |
mbed_official | 76:aeb1df146756 | 240 | ((FLAG) == CEC_FLAG_TXUDR)|| \ |
mbed_official | 76:aeb1df146756 | 241 | ((FLAG) == CEC_FLAG_TXEND)|| \ |
mbed_official | 76:aeb1df146756 | 242 | ((FLAG) == CEC_FLAG_TXBR)|| \ |
mbed_official | 76:aeb1df146756 | 243 | ((FLAG) == CEC_FLAG_ARBLST)|| \ |
mbed_official | 76:aeb1df146756 | 244 | ((FLAG) == CEC_FLAG_RXACKE)|| \ |
mbed_official | 76:aeb1df146756 | 245 | ((FLAG) == CEC_FLAG_LBPE)|| \ |
mbed_official | 76:aeb1df146756 | 246 | ((FLAG) == CEC_FLAG_SBPE)|| \ |
mbed_official | 76:aeb1df146756 | 247 | ((FLAG) == CEC_FLAG_BRE)|| \ |
mbed_official | 76:aeb1df146756 | 248 | ((FLAG) == CEC_FLAG_RXOVR)|| \ |
mbed_official | 76:aeb1df146756 | 249 | ((FLAG) == CEC_FLAG_RXEND)|| \ |
mbed_official | 76:aeb1df146756 | 250 | ((FLAG) == CEC_FLAG_RXBR)) |
mbed_official | 76:aeb1df146756 | 251 | /** |
mbed_official | 76:aeb1df146756 | 252 | * @} |
mbed_official | 76:aeb1df146756 | 253 | */ |
mbed_official | 76:aeb1df146756 | 254 | |
mbed_official | 76:aeb1df146756 | 255 | /** |
mbed_official | 76:aeb1df146756 | 256 | * @} |
mbed_official | 76:aeb1df146756 | 257 | */ |
mbed_official | 76:aeb1df146756 | 258 | |
mbed_official | 76:aeb1df146756 | 259 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 260 | /* Exported functions ------------------------------------------------------- */ |
mbed_official | 76:aeb1df146756 | 261 | |
mbed_official | 76:aeb1df146756 | 262 | /* Function used to set the CEC configuration to the default reset state *****/ |
mbed_official | 76:aeb1df146756 | 263 | void CEC_DeInit(void); |
mbed_official | 76:aeb1df146756 | 264 | |
mbed_official | 76:aeb1df146756 | 265 | /* CEC_Initialization and Configuration functions *****************************/ |
mbed_official | 76:aeb1df146756 | 266 | void CEC_Init(CEC_InitTypeDef* CEC_InitStruct); |
mbed_official | 76:aeb1df146756 | 267 | void CEC_StructInit(CEC_InitTypeDef* CEC_InitStruct); |
mbed_official | 76:aeb1df146756 | 268 | void CEC_Cmd(FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 269 | void CEC_ListenModeCmd(FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 270 | void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress); |
mbed_official | 76:aeb1df146756 | 271 | void CEC_OwnAddressClear(void); |
mbed_official | 76:aeb1df146756 | 272 | |
mbed_official | 76:aeb1df146756 | 273 | /* CEC_Data transfers functions ***********************************************/ |
mbed_official | 76:aeb1df146756 | 274 | void CEC_SendData(uint8_t Data); |
mbed_official | 76:aeb1df146756 | 275 | uint8_t CEC_ReceiveData(void); |
mbed_official | 76:aeb1df146756 | 276 | void CEC_StartOfMessage(void); |
mbed_official | 76:aeb1df146756 | 277 | void CEC_EndOfMessage(void); |
mbed_official | 76:aeb1df146756 | 278 | |
mbed_official | 76:aeb1df146756 | 279 | /* CEC_Interrupts and flags management functions ******************************/ |
mbed_official | 76:aeb1df146756 | 280 | void CEC_ITConfig(uint16_t CEC_IT, FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 281 | FlagStatus CEC_GetFlagStatus(uint16_t CEC_FLAG); |
mbed_official | 76:aeb1df146756 | 282 | void CEC_ClearFlag(uint32_t CEC_FLAG); |
mbed_official | 76:aeb1df146756 | 283 | ITStatus CEC_GetITStatus(uint16_t CEC_IT); |
mbed_official | 76:aeb1df146756 | 284 | void CEC_ClearITPendingBit(uint16_t CEC_IT); |
mbed_official | 76:aeb1df146756 | 285 | |
mbed_official | 76:aeb1df146756 | 286 | #ifdef __cplusplus |
mbed_official | 76:aeb1df146756 | 287 | } |
mbed_official | 76:aeb1df146756 | 288 | #endif |
mbed_official | 76:aeb1df146756 | 289 | |
mbed_official | 76:aeb1df146756 | 290 | #endif /* __STM32F0XX_CEC_H */ |
mbed_official | 76:aeb1df146756 | 291 | |
mbed_official | 76:aeb1df146756 | 292 | /** |
mbed_official | 76:aeb1df146756 | 293 | * @} |
mbed_official | 76:aeb1df146756 | 294 | */ |
mbed_official | 76:aeb1df146756 | 295 | |
mbed_official | 76:aeb1df146756 | 296 | /** |
mbed_official | 76:aeb1df146756 | 297 | * @} |
mbed_official | 76:aeb1df146756 | 298 | */ |
mbed_official | 76:aeb1df146756 | 299 | |
mbed_official | 76:aeb1df146756 | 300 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |