您好,欢迎光临本网站![请登录][注册会员]  
文件名称: stm32f051 标准外设库
  所属分类: C
  开发工具:
  文件大小: 11mb
  下载次数: 0
  上传时间: 2013-04-18
  提 供 者: oq***
 详细说明: stm32f051 标准外设库/** ****************************************************************************** * @file stm32f0xx_cec.c * @author MCD Application Team * @version V1.0.1 * @date 20-April-2012 * @brief This file provides firmware functions to manage the following * functionalities of the Consumer Electronics Control (CEC) peripheral: * + Initialization and Configuration * + Data transfers functions * + Interrupts and flags management * * @verbatim ============================================================================== ##### CEC features ##### ============================================================================== [..] This device provides some features: (#) Supports HDMI-CEC specification 1.4. (#) Supports two source clocks(HSI/244 or LSE). (#) Works in stop mode(without APB clock, but with CEC clock 32KHz). It can genarate an interrupt in the CEC clock domain that the CPU wakes up from the low power mode. (#) Configurable Signal Free Time before of transmission start. The number of nominal data bit periods waited before transmission can be ruled by Hardware or Software. (#) Configurable Peripheral Address (multi-addressing configuration). (#) Supports listen mode.The CEC Messages addressed to different destination can be received without interfering with CEC bus when Listen mode option is enabled. (#) Configurable Rx-Tolerance(Standard and Extended tolerance margin). (#) Error detection with configurable error bit generation. (#) Arbitration lost error in the case of two CEC devices starting at the same time. ##### How to use this driver ##### ============================================================================== [..] This driver provides functions to configure and program the CEC device, follow steps below: (#) The source clock can be configured using: (++) RCC_CECCLKConfig(RCC_CECCLK_HSI_Div244) for HSI(Default) (++) RCC_CECCLKConfig(RCC_CECCLK_LSE) for LSE. (#) Enable CEC peripheral clock using RCC_APBPeriphClockCmd(RCC_APBPeriph_CEC, ENABLE). (#) Peripherals alternate function. (++) Connect the pin to the desired peripherals' Alternate Function (AF) using GPIO_PinAFConfig() function. (++) Configure the desired pin in alternate function by: GPIO_InitStruct->GPIO_Mode = GPIO_Mode_AF. (++) Select the type open-drain and output speed via GPIO_OType and GPIO_Speed members. (++) Call GPIO_Init() function. (#) Configure the Signal Free Time, Rx Tolerance, Stop reception generation and Bit error generation using the CEC_Init() function. The function CEC_Init() must be called when the CEC peripheral is disabled. (#) Configure the CEC own address by calling the fuction CEC_OwnAddressConfig(). (#) Optionally, you can configure the Listen mode using the function CEC_ListenModeCmd(). (#) Enable the NVIC and the corresponding interrupt using the function CEC_ITConfig() if you need to use interrupt mode. CEC_ITConfig() must be called before enabling the CEC peripheral. (#) Enable the CEC using the CEC_Cmd() function. (#) Charge the first data byte in the TXDR register using CEC_SendDataByte(). (#) Enable the transmission of the Byte of a CEC message using CEC_StartOfMessage() (#) Transmit single data through the CEC peripheral using CEC_SendDataByte() and Receive the last transmitted byte using CEC_ReceiveDataByte(). (#) Enable the CEC_EndOfMessage() in order to indicate the last byte of the message. [..] (@) If the listen mode is enabled, Stop reception generation and Bit error generation must be in reset state. (@) If the CEC message consists of only 1 byte, the function CEC_EndOfMessage() must be called before CEC_StartOfMessage(). @endverbatim * ****************************************************************************** * @attention * *

(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: stm32f051
 输入关键字,在本站1000多万海量源码库中尽情搜索: