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:
237:f3da66175598
test with CLOCK_SETUP = 0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 237:f3da66175598 1 /**
mbed_official 237:f3da66175598 2 ******************************************************************************
mbed_official 237:f3da66175598 3 * @file stm32f3xx_hal_cec.h
mbed_official 237:f3da66175598 4 * @author MCD Application Team
mbed_official 237:f3da66175598 5 * @version V1.0.1
mbed_official 237:f3da66175598 6 * @date 18-June-2014
mbed_official 237:f3da66175598 7 * @brief Header file of CEC HAL module.
mbed_official 237:f3da66175598 8 ******************************************************************************
mbed_official 237:f3da66175598 9 * @attention
mbed_official 237:f3da66175598 10 *
mbed_official 237:f3da66175598 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 237:f3da66175598 12 *
mbed_official 237:f3da66175598 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 237:f3da66175598 14 * are permitted provided that the following conditions are met:
mbed_official 237:f3da66175598 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 237:f3da66175598 16 * this list of conditions and the following disclaimer.
mbed_official 237:f3da66175598 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 237:f3da66175598 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 237:f3da66175598 19 * and/or other materials provided with the distribution.
mbed_official 237:f3da66175598 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 237:f3da66175598 21 * may be used to endorse or promote products derived from this software
mbed_official 237:f3da66175598 22 * without specific prior written permission.
mbed_official 237:f3da66175598 23 *
mbed_official 237:f3da66175598 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 237:f3da66175598 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 237:f3da66175598 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 237:f3da66175598 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 237:f3da66175598 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 237:f3da66175598 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 237:f3da66175598 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 237:f3da66175598 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 237:f3da66175598 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 237:f3da66175598 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 237:f3da66175598 34 *
mbed_official 237:f3da66175598 35 ******************************************************************************
mbed_official 237:f3da66175598 36 */
mbed_official 237:f3da66175598 37
mbed_official 237:f3da66175598 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 237:f3da66175598 39 #ifndef __STM32F3xx_HAL_CEC_H
mbed_official 237:f3da66175598 40 #define __STM32F3xx_HAL_CEC_H
mbed_official 237:f3da66175598 41
mbed_official 237:f3da66175598 42 #ifdef __cplusplus
mbed_official 237:f3da66175598 43 extern "C" {
mbed_official 237:f3da66175598 44 #endif
mbed_official 237:f3da66175598 45
mbed_official 237:f3da66175598 46 #if defined(STM32F373xC) || defined(STM32F378xx)
mbed_official 237:f3da66175598 47 /* Includes ------------------------------------------------------------------*/
mbed_official 237:f3da66175598 48 #include "stm32f3xx_hal_def.h"
mbed_official 237:f3da66175598 49
mbed_official 237:f3da66175598 50 /** @addtogroup STM32F3xx_HAL_Driver
mbed_official 237:f3da66175598 51 * @{
mbed_official 237:f3da66175598 52 */
mbed_official 237:f3da66175598 53
mbed_official 237:f3da66175598 54 /** @addtogroup CEC
mbed_official 237:f3da66175598 55 * @{
mbed_official 237:f3da66175598 56 */
mbed_official 237:f3da66175598 57
mbed_official 237:f3da66175598 58 /* Exported types ------------------------------------------------------------*/
mbed_official 237:f3da66175598 59
mbed_official 237:f3da66175598 60 /**
mbed_official 237:f3da66175598 61 * @brief CEC Init Structure definition
mbed_official 237:f3da66175598 62 */
mbed_official 237:f3da66175598 63 typedef struct
mbed_official 237:f3da66175598 64 {
mbed_official 237:f3da66175598 65 uint32_t SignalFreeTime; /*!< Set SFT field, specifies the Signal Free Time.
mbed_official 237:f3da66175598 66 It can be one of @ref CEC_Signal_Free_Time
mbed_official 237:f3da66175598 67 and belongs to the set {0,...,7} where
mbed_official 237:f3da66175598 68 0x0 is the default configuration
mbed_official 237:f3da66175598 69 else means 0.5 + (SignalFreeTime - 1) nominal data bit periods */
mbed_official 237:f3da66175598 70
mbed_official 237:f3da66175598 71 uint32_t Tolerance; /*!< Set RXTOL bit, specifies the tolerance accepted on the received waveforms,
mbed_official 237:f3da66175598 72 it can be a value of @ref CEC_Tolerance : it is either CEC_STANDARD_TOLERANCE
mbed_official 237:f3da66175598 73 or CEC_EXTENDED_TOLERANCE */
mbed_official 237:f3da66175598 74
mbed_official 237:f3da66175598 75 uint32_t BRERxStop; /*!< Set BRESTP bit @ref CEC_BRERxStop : specifies whether or not a Bit Rising Error stops the reception.
mbed_official 237:f3da66175598 76 CEC_NO_RX_STOP_ON_BRE: reception is not stopped.
mbed_official 237:f3da66175598 77 CEC_RX_STOP_ON_BRE: reception is stopped. */
mbed_official 237:f3da66175598 78
mbed_official 237:f3da66175598 79 uint32_t BREErrorBitGen; /*!< Set BREGEN bit @ref CEC_BREErrorBitGen : specifies whether or not an Error-Bit is generated on the
mbed_official 237:f3da66175598 80 CEC line upon Bit Rising Error detection.
mbed_official 237:f3da66175598 81 CEC_BRE_ERRORBIT_NO_GENERATION: no error-bit generation.
mbed_official 237:f3da66175598 82 CEC_BRE_ERRORBIT_GENERATION: error-bit generation if BRESTP is set. */
mbed_official 237:f3da66175598 83
mbed_official 237:f3da66175598 84 uint32_t LBPEErrorBitGen; /*!< Set LBPEGEN bit @ref CEC_LBPEErrorBitGen : specifies whether or not an Error-Bit is generated on the
mbed_official 237:f3da66175598 85 CEC line upon Long Bit Period Error detection.
mbed_official 237:f3da66175598 86 CEC_LBPE_ERRORBIT_NO_GENERATION: no error-bit generation.
mbed_official 237:f3da66175598 87 CEC_LBPE_ERRORBIT_GENERATION: error-bit generation. */
mbed_official 237:f3da66175598 88
mbed_official 237:f3da66175598 89 uint32_t BroadcastMsgNoErrorBitGen; /*!< Set BRDNOGEN bit @ref CEC_BroadCastMsgErrorBitGen : allows to avoid an Error-Bit generation on the CEC line
mbed_official 237:f3da66175598 90 upon an error detected on a broadcast message.
mbed_official 237:f3da66175598 91
mbed_official 237:f3da66175598 92 It supersedes BREGEN and LBPEGEN bits for a broadcast message error handling. It can take two values:
mbed_official 237:f3da66175598 93
mbed_official 237:f3da66175598 94 1) CEC_BROADCASTERROR_ERRORBIT_GENERATION.
mbed_official 237:f3da66175598 95 a) BRE detection: error-bit generation on the CEC line if BRESTP=CEC_RX_STOP_ON_BRE
mbed_official 237:f3da66175598 96 and BREGEN=CEC_BRE_ERRORBIT_NO_GENERATION.
mbed_official 237:f3da66175598 97 b) LBPE detection: error-bit generation on the CEC line
mbed_official 237:f3da66175598 98 if LBPGEN=CEC_LBPE_ERRORBIT_NO_GENERATION.
mbed_official 237:f3da66175598 99
mbed_official 237:f3da66175598 100 2) CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION.
mbed_official 237:f3da66175598 101 no error-bit generation in case neither a) nor b) are satisfied. Additionally,
mbed_official 237:f3da66175598 102 there is no error-bit generation in case of Short Bit Period Error detection in
mbed_official 237:f3da66175598 103 a broadcast message while LSTN bit is set. */
mbed_official 237:f3da66175598 104
mbed_official 237:f3da66175598 105 uint32_t SignalFreeTimeOption; /*!< Set SFTOP bit @ref CEC_SFT_Option : specifies when SFT timer starts.
mbed_official 237:f3da66175598 106 CEC_SFT_START_ON_TXSOM SFT: timer starts when TXSOM is set by software.
mbed_official 237:f3da66175598 107 CEC_SFT_START_ON_TX_RX_END: SFT timer starts automatically at the end of message transmission/reception. */
mbed_official 237:f3da66175598 108
mbed_official 237:f3da66175598 109 uint32_t OwnAddress; /*!< Set OAR field, specifies CEC device address within a 15-bit long field */
mbed_official 237:f3da66175598 110
mbed_official 237:f3da66175598 111 uint32_t ListenMode; /*!< Set LSTN bit @ref CEC_Listening_Mode : specifies device listening mode. It can take two values:
mbed_official 237:f3da66175598 112
mbed_official 237:f3da66175598 113 CEC_REDUCED_LISTENING_MODE: CEC peripheral receives only message addressed to its
mbed_official 237:f3da66175598 114 own address (OAR). Messages addressed to different destination are ignored.
mbed_official 237:f3da66175598 115 Broadcast messages are always received.
mbed_official 237:f3da66175598 116
mbed_official 237:f3da66175598 117 CEC_FULL_LISTENING_MODE: CEC peripheral receives messages addressed to its own
mbed_official 237:f3da66175598 118 address (OAR) with positive acknowledge. Messages addressed to different destination
mbed_official 237:f3da66175598 119 are received, but without interfering with the CEC bus: no acknowledge sent. */
mbed_official 237:f3da66175598 120
mbed_official 237:f3da66175598 121 uint8_t InitiatorAddress; /* Initiator address (source logical address, sent in each header) */
mbed_official 237:f3da66175598 122
mbed_official 237:f3da66175598 123 }CEC_InitTypeDef;
mbed_official 237:f3da66175598 124
mbed_official 237:f3da66175598 125 /**
mbed_official 237:f3da66175598 126 * @brief HAL CEC State structures definition
mbed_official 237:f3da66175598 127 */
mbed_official 237:f3da66175598 128 typedef enum
mbed_official 237:f3da66175598 129 {
mbed_official 237:f3da66175598 130 HAL_CEC_STATE_RESET = 0x00, /*!< Peripheral Reset state */
mbed_official 237:f3da66175598 131 HAL_CEC_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
mbed_official 237:f3da66175598 132 HAL_CEC_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
mbed_official 237:f3da66175598 133 HAL_CEC_STATE_BUSY_TX = 0x03, /*!< Data Transmission process is ongoing */
mbed_official 237:f3da66175598 134 HAL_CEC_STATE_BUSY_RX = 0x04, /*!< Data Reception process is ongoing */
mbed_official 237:f3da66175598 135 HAL_CEC_STATE_STANDBY_RX = 0x05, /*!< IP ready to receive, doesn't prevent IP to transmit */
mbed_official 237:f3da66175598 136 HAL_CEC_STATE_TIMEOUT = 0x06, /*!< Timeout state */
mbed_official 237:f3da66175598 137 HAL_CEC_STATE_ERROR = 0x07 /*!< State Error */
mbed_official 237:f3da66175598 138 }HAL_CEC_StateTypeDef;
mbed_official 237:f3da66175598 139
mbed_official 237:f3da66175598 140 /**
mbed_official 237:f3da66175598 141 * @brief HAL Error structures definition
mbed_official 237:f3da66175598 142 */
mbed_official 237:f3da66175598 143 typedef enum
mbed_official 237:f3da66175598 144 {
mbed_official 237:f3da66175598 145 HAL_CEC_ERROR_NONE = (uint32_t) 0x0, /*!< no error */
mbed_official 237:f3da66175598 146 HAL_CEC_ERROR_RXOVR = CEC_ISR_RXOVR, /*!< CEC Rx-Overrun */
mbed_official 237:f3da66175598 147 HAL_CEC_ERROR_BRE = CEC_ISR_BRE, /*!< CEC Rx Bit Rising Error */
mbed_official 237:f3da66175598 148 HAL_CEC_ERROR_SBPE = CEC_ISR_SBPE, /*!< CEC Rx Short Bit period Error */
mbed_official 237:f3da66175598 149 HAL_CEC_ERROR_LBPE = CEC_ISR_LBPE, /*!< CEC Rx Long Bit period Error */
mbed_official 237:f3da66175598 150 HAL_CEC_ERROR_RXACKE = CEC_ISR_RXACKE, /*!< CEC Rx Missing Acknowledge */
mbed_official 237:f3da66175598 151 HAL_CEC_ERROR_ARBLST = CEC_ISR_ARBLST, /*!< CEC Arbitration Lost */
mbed_official 237:f3da66175598 152 HAL_CEC_ERROR_TXUDR = CEC_ISR_TXUDR, /*!< CEC Tx-Buffer Underrun */
mbed_official 237:f3da66175598 153 HAL_CEC_ERROR_TXERR = CEC_ISR_TXERR, /*!< CEC Tx-Error */
mbed_official 237:f3da66175598 154 HAL_CEC_ERROR_TXACKE = CEC_ISR_TXACKE /*!< CEC Tx Missing Acknowledge */
mbed_official 237:f3da66175598 155 }
mbed_official 237:f3da66175598 156 HAL_CEC_ErrorTypeDef;
mbed_official 237:f3da66175598 157
mbed_official 237:f3da66175598 158 /**
mbed_official 237:f3da66175598 159 * @brief CEC handle Structure definition
mbed_official 237:f3da66175598 160 */
mbed_official 237:f3da66175598 161 typedef struct
mbed_official 237:f3da66175598 162 {
mbed_official 237:f3da66175598 163 CEC_TypeDef *Instance; /* CEC registers base address */
mbed_official 237:f3da66175598 164
mbed_official 237:f3da66175598 165 CEC_InitTypeDef Init; /* CEC communication parameters */
mbed_official 237:f3da66175598 166
mbed_official 237:f3da66175598 167 uint8_t *pTxBuffPtr; /* Pointer to CEC Tx transfer Buffer */
mbed_official 237:f3da66175598 168
mbed_official 237:f3da66175598 169 uint16_t TxXferCount; /* CEC Tx Transfer Counter */
mbed_official 237:f3da66175598 170
mbed_official 237:f3da66175598 171 uint8_t *pRxBuffPtr; /* Pointer to CEC Rx transfer Buffer */
mbed_official 237:f3da66175598 172
mbed_official 237:f3da66175598 173 uint16_t RxXferSize; /* CEC Rx Transfer size, 0: header received only */
mbed_official 237:f3da66175598 174
mbed_official 237:f3da66175598 175 uint32_t ErrorCode; /* For errors handling purposes, copy of ISR register
mbed_official 237:f3da66175598 176 in case error is reported */
mbed_official 237:f3da66175598 177
mbed_official 237:f3da66175598 178 HAL_LockTypeDef Lock; /* Locking object */
mbed_official 237:f3da66175598 179
mbed_official 237:f3da66175598 180 HAL_CEC_StateTypeDef State; /* CEC communication state */
mbed_official 237:f3da66175598 181
mbed_official 237:f3da66175598 182 }CEC_HandleTypeDef;
mbed_official 237:f3da66175598 183
mbed_official 237:f3da66175598 184
mbed_official 237:f3da66175598 185
mbed_official 237:f3da66175598 186 /* Exported constants --------------------------------------------------------*/
mbed_official 237:f3da66175598 187 /** @defgroup CEC_Exported_Constants
mbed_official 237:f3da66175598 188 * @{
mbed_official 237:f3da66175598 189 */
mbed_official 237:f3da66175598 190
mbed_official 237:f3da66175598 191 /** @defgroup CEC_Signal_Free_Time Signal Free Time setting parameter
mbed_official 237:f3da66175598 192 * @{
mbed_official 237:f3da66175598 193 */
mbed_official 237:f3da66175598 194 #define CEC_DEFAULT_SFT ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 195 #define CEC_0_5_BITPERIOD_SFT ((uint32_t)0x00000001)
mbed_official 237:f3da66175598 196 #define CEC_1_5_BITPERIOD_SFT ((uint32_t)0x00000002)
mbed_official 237:f3da66175598 197 #define CEC_2_5_BITPERIOD_SFT ((uint32_t)0x00000003)
mbed_official 237:f3da66175598 198 #define CEC_3_5_BITPERIOD_SFT ((uint32_t)0x00000004)
mbed_official 237:f3da66175598 199 #define CEC_4_5_BITPERIOD_SFT ((uint32_t)0x00000005)
mbed_official 237:f3da66175598 200 #define CEC_5_5_BITPERIOD_SFT ((uint32_t)0x00000006)
mbed_official 237:f3da66175598 201 #define CEC_6_5_BITPERIOD_SFT ((uint32_t)0x00000007)
mbed_official 237:f3da66175598 202 #define IS_CEC_SIGNALFREETIME(SFT) ((SFT) <= CEC_CFGR_SFT)
mbed_official 237:f3da66175598 203 /**
mbed_official 237:f3da66175598 204 * @}
mbed_official 237:f3da66175598 205 */
mbed_official 237:f3da66175598 206
mbed_official 237:f3da66175598 207 /** @defgroup CEC_Tolerance Receiver Tolerance
mbed_official 237:f3da66175598 208 * @{
mbed_official 237:f3da66175598 209 */
mbed_official 237:f3da66175598 210 #define CEC_STANDARD_TOLERANCE ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 211 #define CEC_EXTENDED_TOLERANCE ((uint32_t)CEC_CFGR_RXTOL)
mbed_official 237:f3da66175598 212 #define IS_CEC_TOLERANCE(RXTOL) (((RXTOL) == CEC_STANDARD_TOLERANCE) || \
mbed_official 237:f3da66175598 213 ((RXTOL) == CEC_EXTENDED_TOLERANCE))
mbed_official 237:f3da66175598 214 /**
mbed_official 237:f3da66175598 215 * @}
mbed_official 237:f3da66175598 216 */
mbed_official 237:f3da66175598 217
mbed_official 237:f3da66175598 218 /** @defgroup CEC_BRERxStop Reception Stop on Error
mbed_official 237:f3da66175598 219 * @{
mbed_official 237:f3da66175598 220 */
mbed_official 237:f3da66175598 221 #define CEC_NO_RX_STOP_ON_BRE ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 222 #define CEC_RX_STOP_ON_BRE ((uint32_t)CEC_CFGR_BRESTP)
mbed_official 237:f3da66175598 223 #define IS_CEC_BRERXSTOP(BRERXSTOP) (((BRERXSTOP) == CEC_NO_RX_STOP_ON_BRE) || \
mbed_official 237:f3da66175598 224 ((BRERXSTOP) == CEC_RX_STOP_ON_BRE))
mbed_official 237:f3da66175598 225 /**
mbed_official 237:f3da66175598 226 * @}
mbed_official 237:f3da66175598 227 */
mbed_official 237:f3da66175598 228
mbed_official 237:f3da66175598 229 /** @defgroup CEC_BREErrorBitGen Error Bit Generation if Bit Rise Error reported
mbed_official 237:f3da66175598 230 * @{
mbed_official 237:f3da66175598 231 */
mbed_official 237:f3da66175598 232 #define CEC_BRE_ERRORBIT_NO_GENERATION ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 233 #define CEC_BRE_ERRORBIT_GENERATION ((uint32_t)CEC_CFGR_BREGEN)
mbed_official 237:f3da66175598 234 #define IS_CEC_BREERRORBITGEN(ERRORBITGEN) (((ERRORBITGEN) == CEC_BRE_ERRORBIT_NO_GENERATION) || \
mbed_official 237:f3da66175598 235 ((ERRORBITGEN) == CEC_BRE_ERRORBIT_GENERATION))
mbed_official 237:f3da66175598 236 /**
mbed_official 237:f3da66175598 237 * @}
mbed_official 237:f3da66175598 238 */
mbed_official 237:f3da66175598 239
mbed_official 237:f3da66175598 240 /** @defgroup CEC_LBPEErrorBitGen Error Bit Generation if Long Bit Period Error reported
mbed_official 237:f3da66175598 241 * @{
mbed_official 237:f3da66175598 242 */
mbed_official 237:f3da66175598 243 #define CEC_LBPE_ERRORBIT_NO_GENERATION ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 244 #define CEC_LBPE_ERRORBIT_GENERATION ((uint32_t)CEC_CFGR_LBPEGEN)
mbed_official 237:f3da66175598 245 #define IS_CEC_LBPEERRORBITGEN(ERRORBITGEN) (((ERRORBITGEN) == CEC_LBPE_ERRORBIT_NO_GENERATION) || \
mbed_official 237:f3da66175598 246 ((ERRORBITGEN) == CEC_LBPE_ERRORBIT_GENERATION))
mbed_official 237:f3da66175598 247 /**
mbed_official 237:f3da66175598 248 * @}
mbed_official 237:f3da66175598 249 */
mbed_official 237:f3da66175598 250
mbed_official 237:f3da66175598 251 /** @defgroup CEC_BroadCastMsgErrorBitGen Error Bit Generation on Broadcast message
mbed_official 237:f3da66175598 252 * @{
mbed_official 237:f3da66175598 253 */
mbed_official 237:f3da66175598 254 #define CEC_BROADCASTERROR_ERRORBIT_GENERATION ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 255 #define CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION ((uint32_t)CEC_CFGR_BRDNOGEN)
mbed_official 237:f3da66175598 256 #define IS_CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION(ERRORBITGEN) (((ERRORBITGEN) == CEC_BROADCASTERROR_ERRORBIT_GENERATION) || \
mbed_official 237:f3da66175598 257 ((ERRORBITGEN) == CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION))
mbed_official 237:f3da66175598 258 /**
mbed_official 237:f3da66175598 259 * @}
mbed_official 237:f3da66175598 260 */
mbed_official 237:f3da66175598 261
mbed_official 237:f3da66175598 262 /** @defgroup CEC_SFT_Option Signal Free Time start option
mbed_official 237:f3da66175598 263 * @{
mbed_official 237:f3da66175598 264 */
mbed_official 237:f3da66175598 265 #define CEC_SFT_START_ON_TXSOM ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 266 #define CEC_SFT_START_ON_TX_RX_END ((uint32_t)CEC_CFGR_SFTOPT)
mbed_official 237:f3da66175598 267 #define IS_CEC_SFTOP(SFTOP) (((SFTOP) == CEC_SFT_START_ON_TXSOM) || \
mbed_official 237:f3da66175598 268 ((SFTOP) == CEC_SFT_START_ON_TX_RX_END))
mbed_official 237:f3da66175598 269 /**
mbed_official 237:f3da66175598 270 * @}
mbed_official 237:f3da66175598 271 */
mbed_official 237:f3da66175598 272
mbed_official 237:f3da66175598 273 /** @defgroup CEC_Listening_Mode Listening mode option
mbed_official 237:f3da66175598 274 * @{
mbed_official 237:f3da66175598 275 */
mbed_official 237:f3da66175598 276 #define CEC_REDUCED_LISTENING_MODE ((uint32_t)0x00000000)
mbed_official 237:f3da66175598 277 #define CEC_FULL_LISTENING_MODE ((uint32_t)CEC_CFGR_LSTN)
mbed_official 237:f3da66175598 278 #define IS_CEC_LISTENING_MODE(MODE) (((MODE) == CEC_REDUCED_LISTENING_MODE) || \
mbed_official 237:f3da66175598 279 ((MODE) == CEC_FULL_LISTENING_MODE))
mbed_official 237:f3da66175598 280 /**
mbed_official 237:f3da66175598 281 * @}
mbed_official 237:f3da66175598 282 */
mbed_official 237:f3da66175598 283
mbed_official 237:f3da66175598 284 /** @defgroup CEC_ALL_ERROR all RX or TX errors flags in CEC ISR register
mbed_official 237:f3da66175598 285 * @{
mbed_official 237:f3da66175598 286 */
mbed_official 237:f3da66175598 287 #define CEC_ISR_ALL_ERROR ((uint32_t)CEC_ISR_RXOVR|CEC_ISR_BRE|CEC_ISR_SBPE|CEC_ISR_LBPE|CEC_ISR_RXACKE|\
mbed_official 237:f3da66175598 288 CEC_ISR_ARBLST|CEC_ISR_TXUDR|CEC_ISR_TXERR|CEC_ISR_TXACKE)
mbed_official 237:f3da66175598 289 /**
mbed_official 237:f3da66175598 290 * @}
mbed_official 237:f3da66175598 291 */
mbed_official 237:f3da66175598 292
mbed_official 237:f3da66175598 293 /** @defgroup CEC_IER_ALL_RX all RX errors interrupts enabling flag
mbed_official 237:f3da66175598 294 * @{
mbed_official 237:f3da66175598 295 */
mbed_official 237:f3da66175598 296 #define CEC_IER_RX_ALL_ERR ((uint32_t)CEC_IER_RXACKEIE|CEC_IER_LBPEIE|CEC_IER_SBPEIE|CEC_IER_BREIE|CEC_IER_RXOVRIE)
mbed_official 237:f3da66175598 297 /**
mbed_official 237:f3da66175598 298 * @}
mbed_official 237:f3da66175598 299 */
mbed_official 237:f3da66175598 300
mbed_official 237:f3da66175598 301 /** @defgroup CEC_IER_ALL_TX all TX errors interrupts enabling flag
mbed_official 237:f3da66175598 302 * @{
mbed_official 237:f3da66175598 303 */
mbed_official 237:f3da66175598 304 #define CEC_IER_TX_ALL_ERR ((uint32_t)CEC_IER_TXACKEIE|CEC_IER_TXERRIE|CEC_IER_TXUDRIE|CEC_IER_ARBLSTIE)
mbed_official 237:f3da66175598 305 /**
mbed_official 237:f3da66175598 306 * @}
mbed_official 237:f3da66175598 307 */
mbed_official 237:f3da66175598 308
mbed_official 237:f3da66175598 309 /** @defgroup CEC_OAR_Position Device Own Address position in CEC CFGR register
mbed_official 237:f3da66175598 310 * @{
mbed_official 237:f3da66175598 311 */
mbed_official 237:f3da66175598 312 #define CEC_CFGR_OAR_LSB_POS ((uint32_t) 16)
mbed_official 237:f3da66175598 313 /**
mbed_official 237:f3da66175598 314 * @}
mbed_official 237:f3da66175598 315 */
mbed_official 237:f3da66175598 316
mbed_official 237:f3da66175598 317 /** @defgroup CEC_Initiator_Position Initiator logical address position in message header
mbed_official 237:f3da66175598 318 * @{
mbed_official 237:f3da66175598 319 */
mbed_official 237:f3da66175598 320 #define CEC_INITIATOR_LSB_POS ((uint32_t) 4)
mbed_official 237:f3da66175598 321 /**
mbed_official 237:f3da66175598 322 * @}
mbed_official 237:f3da66175598 323 */
mbed_official 237:f3da66175598 324
mbed_official 237:f3da66175598 325 /**
mbed_official 237:f3da66175598 326 * @}
mbed_official 237:f3da66175598 327 */
mbed_official 237:f3da66175598 328
mbed_official 237:f3da66175598 329 /* Exported macros -----------------------------------------------------------*/
mbed_official 237:f3da66175598 330 /** @defgroup CEC_Exported_Macros
mbed_official 237:f3da66175598 331 * @{
mbed_official 237:f3da66175598 332 */
mbed_official 237:f3da66175598 333
mbed_official 237:f3da66175598 334 /** @brief Reset CEC handle state
mbed_official 237:f3da66175598 335 * @param __HANDLE__: CEC handle.
mbed_official 237:f3da66175598 336 * @retval None
mbed_official 237:f3da66175598 337 */
mbed_official 237:f3da66175598 338 #define __HAL_CEC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CEC_STATE_RESET)
mbed_official 237:f3da66175598 339
mbed_official 237:f3da66175598 340 /** @brief Checks whether or not the specified CEC interrupt flag is set.
mbed_official 237:f3da66175598 341 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 342 * @param __INTERRUPT__: specifies the interrupt to check.
mbed_official 237:f3da66175598 343 * This parameter can be one of the following values:
mbed_official 237:f3da66175598 344 * @arg CEC_ISR_RXBR : Rx-Byte Received
mbed_official 237:f3da66175598 345 * @arg CEC_ISR_RXEND : End of Reception
mbed_official 237:f3da66175598 346 * @arg CEC_ISR_RXOVR : Rx Overrun
mbed_official 237:f3da66175598 347 * @arg CEC_ISR_BRE : Rx Bit Rising Error
mbed_official 237:f3da66175598 348 * @arg CEC_ISR_SBPE : Rx Short Bit Period Error
mbed_official 237:f3da66175598 349 * @arg CEC_ISR_LBPE : Rx Long Bit Period Error
mbed_official 237:f3da66175598 350 * @arg CEC_ISR_RXACKE : Rx Missing Acknowledge
mbed_official 237:f3da66175598 351 * @arg CEC_ISR_ARBLST : Arbitration lost
mbed_official 237:f3da66175598 352 * @arg CEC_ISR_TXBR : Tx-Byte Request
mbed_official 237:f3da66175598 353 * @arg CEC_ISR_TXEND : End of Transmission
mbed_official 237:f3da66175598 354 * @arg CEC_ISR_TXUDR : Tx-buffer Underrun
mbed_official 237:f3da66175598 355 * @arg CEC_ISR_TXERR : Tx Error
mbed_official 237:f3da66175598 356 * @arg CEC_ISR_TXACKE : Tx Missing Acknowledge
mbed_official 237:f3da66175598 357 * @retval ITStatus
mbed_official 237:f3da66175598 358 */
mbed_official 237:f3da66175598 359 #define __HAL_CEC_GET_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->ISR & (__INTERRUPT__))
mbed_official 237:f3da66175598 360
mbed_official 237:f3da66175598 361 /** @brief Clears the interrupt or status flag when raised (write at 1)
mbed_official 237:f3da66175598 362 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 363 * @param __FLAG__: specifies the interrupt/status flag to clear.
mbed_official 237:f3da66175598 364 * This parameter can be one of the following values:
mbed_official 237:f3da66175598 365 * @arg CEC_ISR_RXBR : Rx-Byte Received
mbed_official 237:f3da66175598 366 * @arg CEC_ISR_RXEND : End of Reception
mbed_official 237:f3da66175598 367 * @arg CEC_ISR_RXOVR : Rx Overrun
mbed_official 237:f3da66175598 368 * @arg CEC_ISR_BRE : Rx Bit Rising Error
mbed_official 237:f3da66175598 369 * @arg CEC_ISR_SBPE : Rx Short Bit Period Error
mbed_official 237:f3da66175598 370 * @arg CEC_ISR_LBPE : Rx Long Bit Period Error
mbed_official 237:f3da66175598 371 * @arg CEC_ISR_RXACKE : Rx Missing Acknowledge
mbed_official 237:f3da66175598 372 * @arg CEC_ISR_ARBLST : Arbitration lost
mbed_official 237:f3da66175598 373 * @arg CEC_ISR_TXBR : Tx-Byte Request
mbed_official 237:f3da66175598 374 * @arg CEC_ISR_TXEND : End of Transmission
mbed_official 237:f3da66175598 375 * @arg CEC_ISR_TXUDR : Tx-buffer Underrun
mbed_official 237:f3da66175598 376 * @arg CEC_ISR_TXERR : Tx Error
mbed_official 237:f3da66175598 377 * @arg CEC_ISR_TXACKE : Tx Missing Acknowledge
mbed_official 237:f3da66175598 378 * @retval none
mbed_official 237:f3da66175598 379 */
mbed_official 237:f3da66175598 380 #define __HAL_CEC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR = (__FLAG__))
mbed_official 237:f3da66175598 381
mbed_official 237:f3da66175598 382 /** @brief Enables the specified CEC interrupt.
mbed_official 237:f3da66175598 383 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 384 * @param __INTERRUPT__: specifies the CEC interrupt to enable.
mbed_official 237:f3da66175598 385 * This parameter can be one of the following values:
mbed_official 237:f3da66175598 386 * @arg CEC_IER_RXBRIE : Rx-Byte Received IT Enable
mbed_official 237:f3da66175598 387 * @arg CEC_IER_RXENDIE : End Of Reception IT Enable
mbed_official 237:f3da66175598 388 * @arg CEC_IER_RXOVRIE : Rx-Overrun IT Enable
mbed_official 237:f3da66175598 389 * @arg CEC_IER_BREIE : Rx Bit Rising Error IT Enable
mbed_official 237:f3da66175598 390 * @arg CEC_IER_SBPEIE : Rx Short Bit period Error IT Enable
mbed_official 237:f3da66175598 391 * @arg CEC_IER_LBPEIE : Rx Long Bit period Error IT Enable
mbed_official 237:f3da66175598 392 * @arg CEC_IER_RXACKEIE : Rx Missing Acknowledge IT Enable
mbed_official 237:f3da66175598 393 * @arg CEC_IER_ARBLSTIE : Arbitration Lost IT Enable
mbed_official 237:f3da66175598 394 * @arg CEC_IER_TXBRIE : Tx Byte Request IT Enable
mbed_official 237:f3da66175598 395 * @arg CEC_IER_TXENDIE : End of Transmission IT Enable
mbed_official 237:f3da66175598 396 * @arg CEC_IER_TXUDRIE : Tx-Buffer Underrun IT Enable
mbed_official 237:f3da66175598 397 * @arg CEC_IER_TXERRIE : Tx-Error IT Enable
mbed_official 237:f3da66175598 398 * @arg CEC_IER_TXACKEIE : Tx Missing Acknowledge IT Enable
mbed_official 237:f3da66175598 399 * @retval none
mbed_official 237:f3da66175598 400 */
mbed_official 237:f3da66175598 401 #define __HAL_CEC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
mbed_official 237:f3da66175598 402
mbed_official 237:f3da66175598 403 /** @brief Disables the specified CEC interrupt.
mbed_official 237:f3da66175598 404 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 405 * @param __INTERRUPT__: specifies the CEC interrupt to disable.
mbed_official 237:f3da66175598 406 * This parameter can be one of the following values:
mbed_official 237:f3da66175598 407 * @arg CEC_IER_RXBRIE : Rx-Byte Received IT Enable
mbed_official 237:f3da66175598 408 * @arg CEC_IER_RXENDIE : End Of Reception IT Enable
mbed_official 237:f3da66175598 409 * @arg CEC_IER_RXOVRIE : Rx-Overrun IT Enable
mbed_official 237:f3da66175598 410 * @arg CEC_IER_BREIE : Rx Bit Rising Error IT Enable
mbed_official 237:f3da66175598 411 * @arg CEC_IER_SBPEIE : Rx Short Bit period Error IT Enable
mbed_official 237:f3da66175598 412 * @arg CEC_IER_LBPEIE : Rx Long Bit period Error IT Enable
mbed_official 237:f3da66175598 413 * @arg CEC_IER_RXACKEIE : Rx Missing Acknowledge IT Enable
mbed_official 237:f3da66175598 414 * @arg CEC_IER_ARBLSTIE : Arbitration Lost IT Enable
mbed_official 237:f3da66175598 415 * @arg CEC_IER_TXBRIE : Tx Byte Request IT Enable
mbed_official 237:f3da66175598 416 * @arg CEC_IER_TXENDIE : End of Transmission IT Enable
mbed_official 237:f3da66175598 417 * @arg CEC_IER_TXUDRIE : Tx-Buffer Underrun IT Enable
mbed_official 237:f3da66175598 418 * @arg CEC_IER_TXERRIE : Tx-Error IT Enable
mbed_official 237:f3da66175598 419 * @arg CEC_IER_TXACKEIE : Tx Missing Acknowledge IT Enable
mbed_official 237:f3da66175598 420 * @retval none
mbed_official 237:f3da66175598 421 */
mbed_official 237:f3da66175598 422 #define __HAL_CEC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= (~(__INTERRUPT__)))
mbed_official 237:f3da66175598 423
mbed_official 237:f3da66175598 424 /** @brief Checks whether or not the specified CEC interrupt is enabled.
mbed_official 237:f3da66175598 425 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 426 * @param __INTERRUPT__: specifies the CEC interrupt to check.
mbed_official 237:f3da66175598 427 * This parameter can be one of the following values:
mbed_official 237:f3da66175598 428 * @arg CEC_IER_RXBRIE : Rx-Byte Received IT Enable
mbed_official 237:f3da66175598 429 * @arg CEC_IER_RXENDIE : End Of Reception IT Enable
mbed_official 237:f3da66175598 430 * @arg CEC_IER_RXOVRIE : Rx-Overrun IT Enable
mbed_official 237:f3da66175598 431 * @arg CEC_IER_BREIE : Rx Bit Rising Error IT Enable
mbed_official 237:f3da66175598 432 * @arg CEC_IER_SBPEIE : Rx Short Bit period Error IT Enable
mbed_official 237:f3da66175598 433 * @arg CEC_IER_LBPEIE : Rx Long Bit period Error IT Enable
mbed_official 237:f3da66175598 434 * @arg CEC_IER_RXACKEIE : Rx Missing Acknowledge IT Enable
mbed_official 237:f3da66175598 435 * @arg CEC_IER_ARBLSTIE : Arbitration Lost IT Enable
mbed_official 237:f3da66175598 436 * @arg CEC_IER_TXBRIE : Tx Byte Request IT Enable
mbed_official 237:f3da66175598 437 * @arg CEC_IER_TXENDIE : End of Transmission IT Enable
mbed_official 237:f3da66175598 438 * @arg CEC_IER_TXUDRIE : Tx-Buffer Underrun IT Enable
mbed_official 237:f3da66175598 439 * @arg CEC_IER_TXERRIE : Tx-Error IT Enable
mbed_official 237:f3da66175598 440 * @arg CEC_IER_TXACKEIE : Tx Missing Acknowledge IT Enable
mbed_official 237:f3da66175598 441 * @retval FlagStatus
mbed_official 237:f3da66175598 442 */
mbed_official 237:f3da66175598 443 #define __HAL_CEC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER & (__INTERRUPT__))
mbed_official 237:f3da66175598 444
mbed_official 237:f3da66175598 445 /** @brief Enables the CEC device
mbed_official 237:f3da66175598 446 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 447 * @retval none
mbed_official 237:f3da66175598 448 */
mbed_official 237:f3da66175598 449 #define __HAL_CEC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= CEC_CR_CECEN)
mbed_official 237:f3da66175598 450
mbed_official 237:f3da66175598 451 /** @brief Disables the CEC device
mbed_official 237:f3da66175598 452 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 453 * @retval none
mbed_official 237:f3da66175598 454 */
mbed_official 237:f3da66175598 455 #define __HAL_CEC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~CEC_CR_CECEN)
mbed_official 237:f3da66175598 456
mbed_official 237:f3da66175598 457 /** @brief Set Transmission Start flag
mbed_official 237:f3da66175598 458 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 459 * @retval none
mbed_official 237:f3da66175598 460 */
mbed_official 237:f3da66175598 461 #define __HAL_CEC_FIRST_BYTE_TX_SET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CEC_CR_TXSOM)
mbed_official 237:f3da66175598 462
mbed_official 237:f3da66175598 463 /** @brief Set Transmission End flag
mbed_official 237:f3da66175598 464 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 465 * @retval none
mbed_official 237:f3da66175598 466 * If the CEC message consists of only one byte, TXEOM must be set before of TXSOM.
mbed_official 237:f3da66175598 467 */
mbed_official 237:f3da66175598 468 #define __HAL_CEC_LAST_BYTE_TX_SET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CEC_CR_TXEOM)
mbed_official 237:f3da66175598 469
mbed_official 237:f3da66175598 470 /** @brief Get Transmission Start flag
mbed_official 237:f3da66175598 471 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 472 * @retval FlagStatus
mbed_official 237:f3da66175598 473 */
mbed_official 237:f3da66175598 474 #define __HAL_CEC_GET_TRANSMISSION_START_FLAG(__HANDLE__) ((__HANDLE__)->Instance->CR & CEC_CR_TXSOM)
mbed_official 237:f3da66175598 475
mbed_official 237:f3da66175598 476 /** @brief Get Transmission End flag
mbed_official 237:f3da66175598 477 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 478 * @retval FlagStatus
mbed_official 237:f3da66175598 479 */
mbed_official 237:f3da66175598 480 #define __HAL_CEC_GET_TRANSMISSION_END_FLAG(__HANDLE__) ((__HANDLE__)->Instance->CR & CEC_CR_TXEOM)
mbed_official 237:f3da66175598 481
mbed_official 237:f3da66175598 482 /** @brief Clear OAR register
mbed_official 237:f3da66175598 483 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 484 * @retval none
mbed_official 237:f3da66175598 485 */
mbed_official 237:f3da66175598 486 #define __HAL_CEC_CLEAR_OAR(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CFGR, CEC_CFGR_OAR)
mbed_official 237:f3da66175598 487
mbed_official 237:f3da66175598 488 /** @brief Set OAR register (without resetting previously set address in case of multi-address mode)
mbed_official 237:f3da66175598 489 * To reset OAR, __HAL_CEC_CLEAR_OAR() needs to be called beforehand
mbed_official 237:f3da66175598 490 * @param __HANDLE__: specifies the CEC Handle.
mbed_official 237:f3da66175598 491 * @param __ADDRESS__: Own Address value (CEC logical address is identified by bit position)
mbed_official 237:f3da66175598 492 * @retval none
mbed_official 237:f3da66175598 493 */
mbed_official 237:f3da66175598 494 #define __HAL_CEC_SET_OAR(__HANDLE__,__ADDRESS__) SET_BIT((__HANDLE__)->Instance->CFGR, (__ADDRESS__)<< CEC_CFGR_OAR_LSB_POS)
mbed_official 237:f3da66175598 495
mbed_official 237:f3da66175598 496 /** @brief Check CEC device Own Address Register (OAR) setting.
mbed_official 237:f3da66175598 497 * OAR address is written in a 15-bit field within CEC_CFGR register.
mbed_official 237:f3da66175598 498 * @param __ADDRESS__: CEC own address.
mbed_official 237:f3da66175598 499 * @retval Test result (TRUE or FALSE).
mbed_official 237:f3da66175598 500 */
mbed_official 237:f3da66175598 501 #define IS_CEC_OAR_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x07FFF)
mbed_official 237:f3da66175598 502
mbed_official 237:f3da66175598 503 /** @brief Check CEC initiator or destination logical address setting.
mbed_official 237:f3da66175598 504 * Initiator and destination addresses are coded over 4 bits.
mbed_official 237:f3da66175598 505 * @param __ADDRESS__: CEC initiator or logical address.
mbed_official 237:f3da66175598 506 * @retval Test result (TRUE or FALSE).
mbed_official 237:f3da66175598 507 */
mbed_official 237:f3da66175598 508 #define IS_CEC_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0xF)
mbed_official 237:f3da66175598 509
mbed_official 237:f3da66175598 510 /** @brief Check CEC message size.
mbed_official 237:f3da66175598 511 * The message size is the payload size: without counting the header,
mbed_official 237:f3da66175598 512 * it varies from 0 byte (ping operation, one header only, no payload) to
mbed_official 237:f3da66175598 513 * 15 bytes (1 opcode and up to 14 operands following the header).
mbed_official 237:f3da66175598 514 * @param __SIZE__: CEC message size.
mbed_official 237:f3da66175598 515 * @retval Test result (TRUE or FALSE).
mbed_official 237:f3da66175598 516 */
mbed_official 237:f3da66175598 517 #define IS_CEC_MSGSIZE(__SIZE__) ((__SIZE__) <= 0xF)
mbed_official 237:f3da66175598 518
mbed_official 237:f3da66175598 519 /**
mbed_official 237:f3da66175598 520 * @}
mbed_official 237:f3da66175598 521 */
mbed_official 237:f3da66175598 522
mbed_official 237:f3da66175598 523 /* Exported functions --------------------------------------------------------*/
mbed_official 237:f3da66175598 524 /* Initialization and de-initialization functions ****************************/
mbed_official 237:f3da66175598 525 HAL_StatusTypeDef HAL_CEC_Init(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 526 HAL_StatusTypeDef HAL_CEC_DeInit(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 527 void HAL_CEC_MspInit(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 528 void HAL_CEC_MspDeInit(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 529
mbed_official 237:f3da66175598 530
mbed_official 237:f3da66175598 531 /* IO operation functions *****************************************************/
mbed_official 237:f3da66175598 532 HAL_StatusTypeDef HAL_CEC_Transmit(CEC_HandleTypeDef *hcec, uint8_t DestinationAddress, uint8_t *pData, uint32_t Size, uint32_t Timeout);
mbed_official 237:f3da66175598 533 HAL_StatusTypeDef HAL_CEC_Receive(CEC_HandleTypeDef *hcec, uint8_t *pData, uint32_t Timeout);
mbed_official 237:f3da66175598 534 HAL_StatusTypeDef HAL_CEC_Transmit_IT(CEC_HandleTypeDef *hcec, uint8_t DestinationAddress, uint8_t *pData, uint32_t Size);
mbed_official 237:f3da66175598 535 HAL_StatusTypeDef HAL_CEC_Receive_IT(CEC_HandleTypeDef *hcec, uint8_t *pData);
mbed_official 237:f3da66175598 536 void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 537 void HAL_CEC_TxCpltCallback(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 538 void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 539 void HAL_CEC_ErrorCallback(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 540
mbed_official 237:f3da66175598 541
mbed_official 237:f3da66175598 542 /* Peripheral State and Error functions ***************************************/
mbed_official 237:f3da66175598 543 HAL_CEC_StateTypeDef HAL_CEC_GetState(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 544 uint32_t HAL_CEC_GetError(CEC_HandleTypeDef *hcec);
mbed_official 237:f3da66175598 545
mbed_official 237:f3da66175598 546 /**
mbed_official 237:f3da66175598 547 * @}
mbed_official 237:f3da66175598 548 */
mbed_official 237:f3da66175598 549
mbed_official 237:f3da66175598 550 /**
mbed_official 237:f3da66175598 551 * @}
mbed_official 237:f3da66175598 552 */
mbed_official 237:f3da66175598 553
mbed_official 237:f3da66175598 554 #endif /* defined(STM32F373xC) || defined(STM32F378xx) */
mbed_official 237:f3da66175598 555
mbed_official 237:f3da66175598 556 #ifdef __cplusplus
mbed_official 237:f3da66175598 557 }
mbed_official 237:f3da66175598 558 #endif
mbed_official 237:f3da66175598 559
mbed_official 237:f3da66175598 560 #endif /* __STM32F3xx_HAL_CEC_H */
mbed_official 237:f3da66175598 561
mbed_official 237:f3da66175598 562 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/