mbed library sources

Dependents:   frdm_kl05z_gpio_test

Fork of mbed-src by mbed official

Committer:
shaoziyang
Date:
Sat Sep 13 14:25:46 2014 +0000
Revision:
323:9e901b0a5aa1
Parent:
130:1dec54e4aec3
test with CLOCK_SETUP = 0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 130:1dec54e4aec3 1 /**
mbed_official 130:1dec54e4aec3 2 ******************************************************************************
mbed_official 130:1dec54e4aec3 3 * @file stm32f0xx_cec.h
mbed_official 130:1dec54e4aec3 4 * @author MCD Application Team
mbed_official 130:1dec54e4aec3 5 * @version V1.3.0
mbed_official 130:1dec54e4aec3 6 * @date 16-January-2014
mbed_official 130:1dec54e4aec3 7 * @brief This file contains all the functions prototypes for the CEC firmware
mbed_official 130:1dec54e4aec3 8 * library, applicable only for STM32F051, STM32F042 and STM32F072 devices.
mbed_official 130:1dec54e4aec3 9 ******************************************************************************
mbed_official 130:1dec54e4aec3 10 * @attention
mbed_official 130:1dec54e4aec3 11 *
mbed_official 130:1dec54e4aec3 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 130:1dec54e4aec3 13 *
mbed_official 130:1dec54e4aec3 14 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 130:1dec54e4aec3 15 * are permitted provided that the following conditions are met:
mbed_official 130:1dec54e4aec3 16 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 130:1dec54e4aec3 17 * this list of conditions and the following disclaimer.
mbed_official 130:1dec54e4aec3 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 130:1dec54e4aec3 19 * this list of conditions and the following disclaimer in the documentation
mbed_official 130:1dec54e4aec3 20 * and/or other materials provided with the distribution.
mbed_official 130:1dec54e4aec3 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 130:1dec54e4aec3 22 * may be used to endorse or promote products derived from this software
mbed_official 130:1dec54e4aec3 23 * without specific prior written permission.
mbed_official 130:1dec54e4aec3 24 *
mbed_official 130:1dec54e4aec3 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 130:1dec54e4aec3 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 130:1dec54e4aec3 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 130:1dec54e4aec3 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 130:1dec54e4aec3 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 130:1dec54e4aec3 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 130:1dec54e4aec3 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 130:1dec54e4aec3 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 130:1dec54e4aec3 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 130:1dec54e4aec3 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 130:1dec54e4aec3 35 *
mbed_official 130:1dec54e4aec3 36 ******************************************************************************
mbed_official 130:1dec54e4aec3 37 */
mbed_official 130:1dec54e4aec3 38
mbed_official 130:1dec54e4aec3 39 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 130:1dec54e4aec3 40 #ifndef __STM32F0XX_CEC_H
mbed_official 130:1dec54e4aec3 41 #define __STM32F0XX_CEC_H
mbed_official 130:1dec54e4aec3 42
mbed_official 130:1dec54e4aec3 43 #ifdef __cplusplus
mbed_official 130:1dec54e4aec3 44 extern "C" {
mbed_official 130:1dec54e4aec3 45 #endif
mbed_official 130:1dec54e4aec3 46
mbed_official 130:1dec54e4aec3 47 /* Includes ------------------------------------------------------------------*/
mbed_official 130:1dec54e4aec3 48 #include "stm32f0xx.h"
mbed_official 130:1dec54e4aec3 49
mbed_official 130:1dec54e4aec3 50 /** @addtogroup STM32F0xx_StdPeriph_Driver
mbed_official 130:1dec54e4aec3 51 * @{
mbed_official 130:1dec54e4aec3 52 */
mbed_official 130:1dec54e4aec3 53
mbed_official 130:1dec54e4aec3 54 /** @addtogroup CEC
mbed_official 130:1dec54e4aec3 55 * @{
mbed_official 130:1dec54e4aec3 56 */
mbed_official 130:1dec54e4aec3 57 /* Exported types ------------------------------------------------------------*/
mbed_official 130:1dec54e4aec3 58
mbed_official 130:1dec54e4aec3 59 /**
mbed_official 130:1dec54e4aec3 60 * @brief CEC Init structure definition
mbed_official 130:1dec54e4aec3 61 */
mbed_official 130:1dec54e4aec3 62 typedef struct
mbed_official 130:1dec54e4aec3 63 {
mbed_official 130:1dec54e4aec3 64 uint32_t CEC_SignalFreeTime; /*!< Specifies the CEC Signal Free Time configuration.
mbed_official 130:1dec54e4aec3 65 This parameter can be a value of @ref CEC_Signal_Free_Time */
mbed_official 130:1dec54e4aec3 66 uint32_t CEC_RxTolerance; /*!< Specifies the CEC Reception Tolerance.
mbed_official 130:1dec54e4aec3 67 This parameter can be a value of @ref CEC_RxTolerance */
mbed_official 130:1dec54e4aec3 68 uint32_t CEC_StopReception; /*!< Specifies the CEC Stop Reception.
mbed_official 130:1dec54e4aec3 69 This parameter can be a value of @ref CEC_Stop_Reception */
mbed_official 130:1dec54e4aec3 70 uint32_t CEC_BitRisingError; /*!< Specifies the CEC Bit Rising Error generation.
mbed_official 130:1dec54e4aec3 71 This parameter can be a value of @ref CEC_Bit_Rising_Error_Generation */
mbed_official 130:1dec54e4aec3 72 uint32_t CEC_LongBitPeriodError; /*!< Specifies the CEC Long Bit Error generation.
mbed_official 130:1dec54e4aec3 73 This parameter can be a value of @ref CEC_Long_Bit_Error_Generation */
mbed_official 130:1dec54e4aec3 74 uint32_t CEC_BRDNoGen; /*!< Specifies the CEC Broadcast Error generation.
mbed_official 130:1dec54e4aec3 75 This parameter can be a value of @ref CEC_BDR_No_Gen */
mbed_official 130:1dec54e4aec3 76 uint32_t CEC_SFTOption; /*!< Specifies the CEC Signal Free Time option.
mbed_official 130:1dec54e4aec3 77 This parameter can be a value of @ref CEC_SFT_Option */
mbed_official 130:1dec54e4aec3 78
mbed_official 130:1dec54e4aec3 79 }CEC_InitTypeDef;
mbed_official 130:1dec54e4aec3 80
mbed_official 130:1dec54e4aec3 81 /* Exported constants --------------------------------------------------------*/
mbed_official 130:1dec54e4aec3 82
mbed_official 130:1dec54e4aec3 83 /** @defgroup CEC_Exported_Constants
mbed_official 130:1dec54e4aec3 84 * @{
mbed_official 130:1dec54e4aec3 85 */
mbed_official 130:1dec54e4aec3 86
mbed_official 130:1dec54e4aec3 87 /** @defgroup CEC_Signal_Free_Time
mbed_official 130:1dec54e4aec3 88 * @{
mbed_official 130:1dec54e4aec3 89 */
mbed_official 130:1dec54e4aec3 90 #define CEC_SignalFreeTime_Standard ((uint32_t)0x00000000) /*!< CEC Signal Free Time Standard */
mbed_official 130:1dec54e4aec3 91 #define CEC_SignalFreeTime_1T ((uint32_t)0x00000001) /*!< CEC 1.5 nominal data bit periods */
mbed_official 130:1dec54e4aec3 92 #define CEC_SignalFreeTime_2T ((uint32_t)0x00000002) /*!< CEC 2.5 nominal data bit periods */
mbed_official 130:1dec54e4aec3 93 #define CEC_SignalFreeTime_3T ((uint32_t)0x00000003) /*!< CEC 3.5 nominal data bit periods */
mbed_official 130:1dec54e4aec3 94 #define CEC_SignalFreeTime_4T ((uint32_t)0x00000004) /*!< CEC 4.5 nominal data bit periods */
mbed_official 130:1dec54e4aec3 95 #define CEC_SignalFreeTime_5T ((uint32_t)0x00000005) /*!< CEC 5.5 nominal data bit periods */
mbed_official 130:1dec54e4aec3 96 #define CEC_SignalFreeTime_6T ((uint32_t)0x00000006) /*!< CEC 6.5 nominal data bit periods */
mbed_official 130:1dec54e4aec3 97 #define CEC_SignalFreeTime_7T ((uint32_t)0x00000007) /*!< CEC 7.5 nominal data bit periods */
mbed_official 130:1dec54e4aec3 98
mbed_official 130:1dec54e4aec3 99 #define IS_CEC_SIGNAL_FREE_TIME(TIME) (((TIME) == CEC_SignalFreeTime_Standard) || \
mbed_official 130:1dec54e4aec3 100 ((TIME) == CEC_SignalFreeTime_1T)|| \
mbed_official 130:1dec54e4aec3 101 ((TIME) == CEC_SignalFreeTime_2T)|| \
mbed_official 130:1dec54e4aec3 102 ((TIME) == CEC_SignalFreeTime_3T)|| \
mbed_official 130:1dec54e4aec3 103 ((TIME) == CEC_SignalFreeTime_4T)|| \
mbed_official 130:1dec54e4aec3 104 ((TIME) == CEC_SignalFreeTime_5T)|| \
mbed_official 130:1dec54e4aec3 105 ((TIME) == CEC_SignalFreeTime_6T)|| \
mbed_official 130:1dec54e4aec3 106 ((TIME) == CEC_SignalFreeTime_7T))
mbed_official 130:1dec54e4aec3 107 /**
mbed_official 130:1dec54e4aec3 108 * @}
mbed_official 130:1dec54e4aec3 109 */
mbed_official 130:1dec54e4aec3 110
mbed_official 130:1dec54e4aec3 111 /** @defgroup CEC_RxTolerance
mbed_official 130:1dec54e4aec3 112 * @{
mbed_official 130:1dec54e4aec3 113 */
mbed_official 130:1dec54e4aec3 114 #define CEC_RxTolerance_Standard ((uint32_t)0x00000000) /*!< Standard Tolerance Margin */
mbed_official 130:1dec54e4aec3 115 #define CEC_RxTolerance_Extended CEC_CFGR_RXTOL /*!< Extended Tolerance Margin */
mbed_official 130:1dec54e4aec3 116
mbed_official 130:1dec54e4aec3 117 #define IS_CEC_RX_TOLERANCE(TOLERANCE) (((TOLERANCE) == CEC_RxTolerance_Standard) || \
mbed_official 130:1dec54e4aec3 118 ((TOLERANCE) == CEC_RxTolerance_Extended))
mbed_official 130:1dec54e4aec3 119 /**
mbed_official 130:1dec54e4aec3 120 * @}
mbed_official 130:1dec54e4aec3 121 */
mbed_official 130:1dec54e4aec3 122
mbed_official 130:1dec54e4aec3 123 /** @defgroup CEC_Stop_Reception
mbed_official 130:1dec54e4aec3 124 * @{
mbed_official 130:1dec54e4aec3 125 */
mbed_official 130:1dec54e4aec3 126 #define CEC_StopReception_Off ((uint32_t)0x00000000) /*!< No RX Stop on bit Rising Error (BRE) */
mbed_official 130:1dec54e4aec3 127 #define CEC_StopReception_On CEC_CFGR_BRESTP /*!< RX Stop on bit Rising Error (BRE) */
mbed_official 130:1dec54e4aec3 128
mbed_official 130:1dec54e4aec3 129 #define IS_CEC_STOP_RECEPTION(RECEPTION) (((RECEPTION) == CEC_StopReception_On) || \
mbed_official 130:1dec54e4aec3 130 ((RECEPTION) == CEC_StopReception_Off))
mbed_official 130:1dec54e4aec3 131 /**
mbed_official 130:1dec54e4aec3 132 * @}
mbed_official 130:1dec54e4aec3 133 */
mbed_official 130:1dec54e4aec3 134
mbed_official 130:1dec54e4aec3 135 /** @defgroup CEC_Bit_Rising_Error_Generation
mbed_official 130:1dec54e4aec3 136 * @{
mbed_official 130:1dec54e4aec3 137 */
mbed_official 130:1dec54e4aec3 138 #define CEC_BitRisingError_Off ((uint32_t)0x00000000) /*!< Bit Rising Error generation turned Off */
mbed_official 130:1dec54e4aec3 139 #define CEC_BitRisingError_On CEC_CFGR_BREGEN /*!< Bit Rising Error generation turned On */
mbed_official 130:1dec54e4aec3 140
mbed_official 130:1dec54e4aec3 141 #define IS_CEC_BIT_RISING_ERROR(ERROR) (((ERROR) == CEC_BitRisingError_Off) || \
mbed_official 130:1dec54e4aec3 142 ((ERROR) == CEC_BitRisingError_On))
mbed_official 130:1dec54e4aec3 143 /**
mbed_official 130:1dec54e4aec3 144 * @}
mbed_official 130:1dec54e4aec3 145 */
mbed_official 130:1dec54e4aec3 146
mbed_official 130:1dec54e4aec3 147 /** @defgroup CEC_Long_Bit_Error_Generation
mbed_official 130:1dec54e4aec3 148 * @{
mbed_official 130:1dec54e4aec3 149 */
mbed_official 130:1dec54e4aec3 150 #define CEC_LongBitPeriodError_Off ((uint32_t)0x00000000) /*!< Long Bit Period Error generation turned Off */
mbed_official 130:1dec54e4aec3 151 #define CEC_LongBitPeriodError_On CEC_CFGR_LREGEN /*!< Long Bit Period Error generation turned On */
mbed_official 130:1dec54e4aec3 152
mbed_official 130:1dec54e4aec3 153 #define IS_CEC_LONG_BIT_PERIOD_ERROR(ERROR) (((ERROR) == CEC_LongBitPeriodError_Off) || \
mbed_official 130:1dec54e4aec3 154 ((ERROR) == CEC_LongBitPeriodError_On))
mbed_official 130:1dec54e4aec3 155 /**
mbed_official 130:1dec54e4aec3 156 * @}
mbed_official 130:1dec54e4aec3 157 */
mbed_official 130:1dec54e4aec3 158
mbed_official 130:1dec54e4aec3 159 /** @defgroup CEC_BDR_No_Gen
mbed_official 130:1dec54e4aec3 160 * @{
mbed_official 130:1dec54e4aec3 161 */
mbed_official 130:1dec54e4aec3 162
mbed_official 130:1dec54e4aec3 163 #define CEC_BRDNoGen_Off ((uint32_t)0x00000000) /*!< Broadcast Bit Rising Error generation turned Off */
mbed_official 130:1dec54e4aec3 164 #define CEC_BRDNoGen_On CEC_CFGR_BRDNOGEN /*!< Broadcast Bit Rising Error generation turned On */
mbed_official 130:1dec54e4aec3 165
mbed_official 130:1dec54e4aec3 166 #define IS_CEC_BDR_NO_GEN_ERROR(ERROR) (((ERROR) == CEC_BRDNoGen_Off) || \
mbed_official 130:1dec54e4aec3 167 ((ERROR) == CEC_BRDNoGen_On))
mbed_official 130:1dec54e4aec3 168 /**
mbed_official 130:1dec54e4aec3 169 * @}
mbed_official 130:1dec54e4aec3 170 */
mbed_official 130:1dec54e4aec3 171
mbed_official 130:1dec54e4aec3 172 /** @defgroup CEC_SFT_Option
mbed_official 130:1dec54e4aec3 173 * @{
mbed_official 130:1dec54e4aec3 174 */
mbed_official 130:1dec54e4aec3 175 #define CEC_SFTOption_Off ((uint32_t)0x00000000) /*!< SFT option turned Off */
mbed_official 130:1dec54e4aec3 176 #define CEC_SFTOption_On CEC_CFGR_SFTOPT /*!< SFT option turned On */
mbed_official 130:1dec54e4aec3 177
mbed_official 130:1dec54e4aec3 178 #define IS_CEC_SFT_OPTION(OPTION) (((OPTION) == CEC_SFTOption_Off) || \
mbed_official 130:1dec54e4aec3 179 ((OPTION) == CEC_SFTOption_On))
mbed_official 130:1dec54e4aec3 180 /**
mbed_official 130:1dec54e4aec3 181 * @}
mbed_official 130:1dec54e4aec3 182 */
mbed_official 130:1dec54e4aec3 183
mbed_official 130:1dec54e4aec3 184 /** @defgroup CEC_Own_Address
mbed_official 130:1dec54e4aec3 185 * @{
mbed_official 130:1dec54e4aec3 186 */
mbed_official 130:1dec54e4aec3 187 #define IS_CEC_ADDRESS(ADDRESS) ((ADDRESS) < 0x10)
mbed_official 130:1dec54e4aec3 188
mbed_official 130:1dec54e4aec3 189 /**
mbed_official 130:1dec54e4aec3 190 * @}
mbed_official 130:1dec54e4aec3 191 */
mbed_official 130:1dec54e4aec3 192
mbed_official 130:1dec54e4aec3 193 /** @defgroup CEC_Interrupt_Configuration_definition
mbed_official 130:1dec54e4aec3 194 * @{
mbed_official 130:1dec54e4aec3 195 */
mbed_official 130:1dec54e4aec3 196 #define CEC_IT_TXACKE CEC_IER_TXACKEIE
mbed_official 130:1dec54e4aec3 197 #define CEC_IT_TXERR CEC_IER_TXERRIE
mbed_official 130:1dec54e4aec3 198 #define CEC_IT_TXUDR CEC_IER_TXUDRIE
mbed_official 130:1dec54e4aec3 199 #define CEC_IT_TXEND CEC_IER_TXENDIE
mbed_official 130:1dec54e4aec3 200 #define CEC_IT_TXBR CEC_IER_TXBRIE
mbed_official 130:1dec54e4aec3 201 #define CEC_IT_ARBLST CEC_IER_ARBLSTIE
mbed_official 130:1dec54e4aec3 202 #define CEC_IT_RXACKE CEC_IER_RXACKEIE
mbed_official 130:1dec54e4aec3 203 #define CEC_IT_LBPE CEC_IER_LBPEIE
mbed_official 130:1dec54e4aec3 204 #define CEC_IT_SBPE CEC_IER_SBPEIE
mbed_official 130:1dec54e4aec3 205 #define CEC_IT_BRE CEC_IER_BREIEIE
mbed_official 130:1dec54e4aec3 206 #define CEC_IT_RXOVR CEC_IER_RXOVRIE
mbed_official 130:1dec54e4aec3 207 #define CEC_IT_RXEND CEC_IER_RXENDIE
mbed_official 130:1dec54e4aec3 208 #define CEC_IT_RXBR CEC_IER_RXBRIE
mbed_official 130:1dec54e4aec3 209
mbed_official 130:1dec54e4aec3 210 #define IS_CEC_IT(IT) ((((IT) & (uint32_t)0xFFFFE000) == 0x00) && ((IT) != 0x00))
mbed_official 130:1dec54e4aec3 211
mbed_official 130:1dec54e4aec3 212 #define IS_CEC_GET_IT(IT) (((IT) == CEC_IT_TXACKE) || \
mbed_official 130:1dec54e4aec3 213 ((IT) == CEC_IT_TXERR)|| \
mbed_official 130:1dec54e4aec3 214 ((IT) == CEC_IT_TXUDR)|| \
mbed_official 130:1dec54e4aec3 215 ((IT) == CEC_IT_TXEND)|| \
mbed_official 130:1dec54e4aec3 216 ((IT) == CEC_IT_TXBR)|| \
mbed_official 130:1dec54e4aec3 217 ((IT) == CEC_IT_ARBLST)|| \
mbed_official 130:1dec54e4aec3 218 ((IT) == CEC_IT_RXACKE)|| \
mbed_official 130:1dec54e4aec3 219 ((IT) == CEC_IT_LBPE)|| \
mbed_official 130:1dec54e4aec3 220 ((IT) == CEC_IT_SBPE)|| \
mbed_official 130:1dec54e4aec3 221 ((IT) == CEC_IT_BRE)|| \
mbed_official 130:1dec54e4aec3 222 ((IT) == CEC_IT_RXOVR)|| \
mbed_official 130:1dec54e4aec3 223 ((IT) == CEC_IT_RXEND)|| \
mbed_official 130:1dec54e4aec3 224 ((IT) == CEC_IT_RXBR))
mbed_official 130:1dec54e4aec3 225 /**
mbed_official 130:1dec54e4aec3 226 * @}
mbed_official 130:1dec54e4aec3 227 */
mbed_official 130:1dec54e4aec3 228
mbed_official 130:1dec54e4aec3 229 /** @defgroup CEC_ISR_register_flags_definition
mbed_official 130:1dec54e4aec3 230 * @{
mbed_official 130:1dec54e4aec3 231 */
mbed_official 130:1dec54e4aec3 232 #define CEC_FLAG_TXACKE CEC_ISR_TXACKE
mbed_official 130:1dec54e4aec3 233 #define CEC_FLAG_TXERR CEC_ISR_TXERR
mbed_official 130:1dec54e4aec3 234 #define CEC_FLAG_TXUDR CEC_ISR_TXUDR
mbed_official 130:1dec54e4aec3 235 #define CEC_FLAG_TXEND CEC_ISR_TXEND
mbed_official 130:1dec54e4aec3 236 #define CEC_FLAG_TXBR CEC_ISR_TXBR
mbed_official 130:1dec54e4aec3 237 #define CEC_FLAG_ARBLST CEC_ISR_ARBLST
mbed_official 130:1dec54e4aec3 238 #define CEC_FLAG_RXACKE CEC_ISR_RXACKE
mbed_official 130:1dec54e4aec3 239 #define CEC_FLAG_LBPE CEC_ISR_LBPE
mbed_official 130:1dec54e4aec3 240 #define CEC_FLAG_SBPE CEC_ISR_SBPE
mbed_official 130:1dec54e4aec3 241 #define CEC_FLAG_BRE CEC_ISR_BRE
mbed_official 130:1dec54e4aec3 242 #define CEC_FLAG_RXOVR CEC_ISR_RXOVR
mbed_official 130:1dec54e4aec3 243 #define CEC_FLAG_RXEND CEC_ISR_RXEND
mbed_official 130:1dec54e4aec3 244 #define CEC_FLAG_RXBR CEC_ISR_RXBR
mbed_official 130:1dec54e4aec3 245
mbed_official 130:1dec54e4aec3 246 #define IS_CEC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFE000) == 0x00) && ((FLAG) != 0x00))
mbed_official 130:1dec54e4aec3 247
mbed_official 130:1dec54e4aec3 248 #define IS_CEC_GET_FLAG(FLAG) (((FLAG) == CEC_FLAG_TXACKE) || \
mbed_official 130:1dec54e4aec3 249 ((FLAG) == CEC_FLAG_TXERR)|| \
mbed_official 130:1dec54e4aec3 250 ((FLAG) == CEC_FLAG_TXUDR)|| \
mbed_official 130:1dec54e4aec3 251 ((FLAG) == CEC_FLAG_TXEND)|| \
mbed_official 130:1dec54e4aec3 252 ((FLAG) == CEC_FLAG_TXBR)|| \
mbed_official 130:1dec54e4aec3 253 ((FLAG) == CEC_FLAG_ARBLST)|| \
mbed_official 130:1dec54e4aec3 254 ((FLAG) == CEC_FLAG_RXACKE)|| \
mbed_official 130:1dec54e4aec3 255 ((FLAG) == CEC_FLAG_LBPE)|| \
mbed_official 130:1dec54e4aec3 256 ((FLAG) == CEC_FLAG_SBPE)|| \
mbed_official 130:1dec54e4aec3 257 ((FLAG) == CEC_FLAG_BRE)|| \
mbed_official 130:1dec54e4aec3 258 ((FLAG) == CEC_FLAG_RXOVR)|| \
mbed_official 130:1dec54e4aec3 259 ((FLAG) == CEC_FLAG_RXEND)|| \
mbed_official 130:1dec54e4aec3 260 ((FLAG) == CEC_FLAG_RXBR))
mbed_official 130:1dec54e4aec3 261 /**
mbed_official 130:1dec54e4aec3 262 * @}
mbed_official 130:1dec54e4aec3 263 */
mbed_official 130:1dec54e4aec3 264
mbed_official 130:1dec54e4aec3 265 /**
mbed_official 130:1dec54e4aec3 266 * @}
mbed_official 130:1dec54e4aec3 267 */
mbed_official 130:1dec54e4aec3 268
mbed_official 130:1dec54e4aec3 269 /* Exported macro ------------------------------------------------------------*/
mbed_official 130:1dec54e4aec3 270 /* Exported functions ------------------------------------------------------- */
mbed_official 130:1dec54e4aec3 271
mbed_official 130:1dec54e4aec3 272 /* Function used to set the CEC configuration to the default reset state *****/
mbed_official 130:1dec54e4aec3 273 void CEC_DeInit(void);
mbed_official 130:1dec54e4aec3 274
mbed_official 130:1dec54e4aec3 275 /* CEC_Initialization and Configuration functions *****************************/
mbed_official 130:1dec54e4aec3 276 void CEC_Init(CEC_InitTypeDef* CEC_InitStruct);
mbed_official 130:1dec54e4aec3 277 void CEC_StructInit(CEC_InitTypeDef* CEC_InitStruct);
mbed_official 130:1dec54e4aec3 278 void CEC_Cmd(FunctionalState NewState);
mbed_official 130:1dec54e4aec3 279 void CEC_ListenModeCmd(FunctionalState NewState);
mbed_official 130:1dec54e4aec3 280 void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress);
mbed_official 130:1dec54e4aec3 281 void CEC_OwnAddressClear(void);
mbed_official 130:1dec54e4aec3 282
mbed_official 130:1dec54e4aec3 283 /* CEC_Data transfers functions ***********************************************/
mbed_official 130:1dec54e4aec3 284 void CEC_SendData(uint8_t Data);
mbed_official 130:1dec54e4aec3 285 uint8_t CEC_ReceiveData(void);
mbed_official 130:1dec54e4aec3 286 void CEC_StartOfMessage(void);
mbed_official 130:1dec54e4aec3 287 void CEC_EndOfMessage(void);
mbed_official 130:1dec54e4aec3 288
mbed_official 130:1dec54e4aec3 289 /* CEC_Interrupts and flags management functions ******************************/
mbed_official 130:1dec54e4aec3 290 void CEC_ITConfig(uint16_t CEC_IT, FunctionalState NewState);
mbed_official 130:1dec54e4aec3 291 FlagStatus CEC_GetFlagStatus(uint16_t CEC_FLAG);
mbed_official 130:1dec54e4aec3 292 void CEC_ClearFlag(uint32_t CEC_FLAG);
mbed_official 130:1dec54e4aec3 293 ITStatus CEC_GetITStatus(uint16_t CEC_IT);
mbed_official 130:1dec54e4aec3 294 void CEC_ClearITPendingBit(uint16_t CEC_IT);
mbed_official 130:1dec54e4aec3 295
mbed_official 130:1dec54e4aec3 296 #ifdef __cplusplus
mbed_official 130:1dec54e4aec3 297 }
mbed_official 130:1dec54e4aec3 298 #endif
mbed_official 130:1dec54e4aec3 299
mbed_official 130:1dec54e4aec3 300 #endif /* __STM32F0XX_CEC_H */
mbed_official 130:1dec54e4aec3 301
mbed_official 130:1dec54e4aec3 302 /**
mbed_official 130:1dec54e4aec3 303 * @}
mbed_official 130:1dec54e4aec3 304 */
mbed_official 130:1dec54e4aec3 305
mbed_official 130:1dec54e4aec3 306 /**
mbed_official 130:1dec54e4aec3 307 * @}
mbed_official 130:1dec54e4aec3 308 */
mbed_official 130:1dec54e4aec3 309
mbed_official 130:1dec54e4aec3 310 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/