A simple 128x32 graphical LCD program to quickstart with LCD on ARM mbed IoT Starter Kit. This requires mbed Applciation Shield with FRDM-K64F platform.

Dependencies:   C12832

Committer:
tushki7
Date:
Sun Apr 12 15:45:52 2015 +0000
Revision:
1:eb68c94a8ee5
Parent:
0:60d829a0353a
A simple 128x32 LCD program with ARM mbed IoT Starter Kit;

Who changed what in which revision?

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