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);