STM32F1 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F1 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Groups
stm32f10x_cec.c File Reference

This file provides all the CEC firmware functions. More...

#include "stm32f10x_cec.h"
#include "stm32f10x_rcc.h"

Macros

#define CEC_OFFSET   (CEC_BASE - PERIPH_BASE)
 
#define CFGR_OFFSET   (CEC_OFFSET + 0x00)
 
#define PE_BitNumber   0x00
 
#define CFGR_PE_BB   (PERIPH_BB_BASE + (CFGR_OFFSET * 32) + (PE_BitNumber * 4))
 
#define IE_BitNumber   0x01
 
#define CFGR_IE_BB   (PERIPH_BB_BASE + (CFGR_OFFSET * 32) + (IE_BitNumber * 4))
 
#define CSR_OFFSET   (CEC_OFFSET + 0x10)
 
#define TSOM_BitNumber   0x00
 
#define CSR_TSOM_BB   (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TSOM_BitNumber * 4))
 
#define TEOM_BitNumber   0x01
 
#define CSR_TEOM_BB   (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TEOM_BitNumber * 4))
 
#define CFGR_CLEAR_Mask   (uint8_t)(0xF3) /* CFGR register Mask */
 
#define FLAG_Mask   ((uint32_t)0x00FFFFFF) /* CEC FLAG mask */
 

Functions

void CEC_DeInit (void)
 Deinitializes the CEC peripheral registers to their default reset values. More...
 
void CEC_Init (CEC_InitTypeDef *CEC_InitStruct)
 Initializes the CEC peripheral according to the specified parameters in the CEC_InitStruct. More...
 
void CEC_Cmd (FunctionalState NewState)
 Enables or disables the specified CEC peripheral. More...
 
void CEC_ITConfig (FunctionalState NewState)
 Enables or disables the CEC interrupt. More...
 
void CEC_OwnAddressConfig (uint8_t CEC_OwnAddress)
 Defines the Own Address of the CEC device. More...
 
void CEC_SetPrescaler (uint16_t CEC_Prescaler)
 Sets the CEC prescaler value. More...
 
void CEC_SendDataByte (uint8_t Data)
 Transmits single data through the CEC peripheral. More...
 
uint8_t CEC_ReceiveDataByte (void)
 Returns the most recent received data by the CEC peripheral. More...
 
void CEC_StartOfMessage (void)
 Starts a new message. More...
 
void CEC_EndOfMessageCmd (FunctionalState NewState)
 Transmits message with or without an EOM bit. More...
 
FlagStatus CEC_GetFlagStatus (uint32_t CEC_FLAG)
 Gets the CEC flag status. More...
 
void CEC_ClearFlag (uint32_t CEC_FLAG)
 Clears the CEC's pending flags. More...
 
ITStatus CEC_GetITStatus (uint8_t CEC_IT)
 Checks whether the specified CEC interrupt has occurred or not. More...
 
void CEC_ClearITPendingBit (uint16_t CEC_IT)
 Clears the CEC's interrupt pending bits. More...
 

Detailed Description

This file provides all the CEC firmware functions.

Author
MCD Application Team
Version
V3.3.0
Date
04/16/2010

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2010 STMicroelectronics