49 #define CEC_OFFSET (CEC_BASE - PERIPH_BASE) 54 #define CFGR_OFFSET (CEC_OFFSET + 0x00) 55 #define PE_BitNumber 0x00 56 #define CFGR_PE_BB (PERIPH_BB_BASE + (CFGR_OFFSET * 32) + (PE_BitNumber * 4)) 59 #define IE_BitNumber 0x01 60 #define CFGR_IE_BB (PERIPH_BB_BASE + (CFGR_OFFSET * 32) + (IE_BitNumber * 4)) 65 #define CSR_OFFSET (CEC_OFFSET + 0x10) 66 #define TSOM_BitNumber 0x00 67 #define CSR_TSOM_BB (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TSOM_BitNumber * 4)) 70 #define TEOM_BitNumber 0x01 71 #define CSR_TEOM_BB (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TEOM_BitNumber * 4)) 73 #define CFGR_CLEAR_Mask (uint8_t)(0xF3) 74 #define FLAG_Mask ((uint32_t)0x00FFFFFF) 205 CEC->OAR = CEC_OwnAddress;
219 CEC->PRES = CEC_Prescaler;
242 return (uint8_t)(
CEC->RXD);
294 uint32_t cecreg = 0, cecbase = 0;
303 cecreg = CEC_FLAG >> 28;
311 CEC_FLAG = (uint32_t)(CEC_FLAG >> 16);
322 if(((*(
__IO uint32_t *)cecbase) & CEC_FLAG) != (uint32_t)
RESET)
356 tmp =
CEC->CSR & 0x2;
359 CEC->CSR &= (uint32_t)(((~(uint32_t)CEC_FLAG) & 0xFFFFFFFC) | tmp);
375 uint32_t enablestatus = 0;
384 if (((
CEC->CSR & CEC_IT) != (uint32_t)
RESET) && enablestatus)
415 tmp =
CEC->CSR & 0x2;
418 CEC->CSR &= (uint32_t)(((~(uint32_t)CEC_IT) & 0xFFFFFFFC) | tmp);
uint16_t CEC_BitPeriodMode
void CEC_ITConfig(FunctionalState NewState)
Enables or disables the CEC interrupt.
#define IS_CEC_CLEAR_FLAG(FLAG)
void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress)
Defines the Own Address of the CEC device.
void CEC_Cmd(FunctionalState NewState)
Enables or disables the specified CEC peripheral.
void CEC_DeInit(void)
Deinitializes the CEC peripheral registers to their default reset values.
#define IS_CEC_ADDRESS(ADDRESS)
void assert_param(int val)
#define IS_CEC_BIT_TIMING_ERROR_MODE(MODE)
#define IS_FUNCTIONAL_STATE(STATE)
#define IS_CEC_GET_IT(IT)
ITStatus CEC_GetITStatus(uint8_t CEC_IT)
Checks whether the specified CEC interrupt has occurred or not.
void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Forces or releases Low Speed APB (APB1) peripheral reset.
uint16_t CEC_BitTimingMode
void CEC_StartOfMessage(void)
Starts a new message.
#define RCC_APB1Periph_CEC
#define IS_CEC_PRESCALER(PRESCALER)
void CEC_SendDataByte(uint8_t Data)
Transmits single data through the CEC peripheral.
This file contains all the functions prototypes for the CEC firmware library.
#define IS_CEC_BIT_PERIOD_ERROR_MODE(MODE)
void CEC_SetPrescaler(uint16_t CEC_Prescaler)
Sets the CEC prescaler value.
#define IS_CEC_GET_FLAG(FLAG)
This file contains all the functions prototypes for the RCC firmware library.
FlagStatus CEC_GetFlagStatus(uint32_t CEC_FLAG)
Gets the CEC flag status.
void CEC_ClearITPendingBit(uint16_t CEC_IT)
Clears the CEC's interrupt pending bits.
void CEC_ClearFlag(uint32_t CEC_FLAG)
Clears the CEC's pending flags.
void CEC_EndOfMessageCmd(FunctionalState NewState)
Transmits message with or without an EOM bit.
void CEC_Init(CEC_InitTypeDef *CEC_InitStruct)
Initializes the CEC peripheral according to the specified parameters in the CEC_InitStruct.
uint8_t CEC_ReceiveDataByte(void)
Returns the most recent received data by the CEC peripheral.
CEC Init structure definition.