资源简介
STM8芯片S系列的完整固件库,带库函数生成软件。
代码片段和文件信息
/**
******************************************************************************
* @file ADC2_ContinuousConversion\main.c
* @brief This file contains the main function for the ADC2 Continuous Conversion example.
* @author STMicroelectronics - MCD Application Team
* @version V1.1.0
* @date 02/27/2009
**************************************************************************
*
* 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 2009 STMicroelectronics
* @image html logo.bmp
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include “stm8s.h“
#include “main.h“
/**
* @addtogroup ADC2_ContinuousConversion
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
u16 Conversion_Value = 0;
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/**
* @brief ADC2_ContinuousConversion main entry point.
* @par Parameters:
* None
* @retval void None
* @par Required preconditions:
* None
*/
void main(void)
{
/* Init GPIO for ADC2 */
GPIO_Init(GPIOE GPIO_PIN_6 GPIO_MODE_IN_FL_NO_IT);
/* Init GPIO for LED */
GPIO_Init(LEDS_PORT (LED1_PIN |LED2_PIN |LED3_PIN |LED4_PIN) GPIO_MODE_OUT_PP_LOW_FAST);
ADC2_DeInit();
enableInterrupts();
/* Init ADC2 peripheral */
ADC2_Init(ADC2_CONVERSIONMODE_CONTINUOUS ADC2_CHANNEL_9 ADC2_PRESSEL_FCPU_D2 ADC2_EXTTRIG_TIM DISABLE ADC2_ALIGN_RIGHT ADC2_SCHMITTTRIG_CHANNEL9 DISABLE);
/* Enable EOC interrupt */
ADC2_ITConfig(ENABLE);
/*Start Conversion */
ADC2_StartConversion();
/* The LEDs state are changed in the interrupt routine */
while (1);
}
/**
* @brief Reports the name of the source file and the source line number where
* the assert error has occurred.
* User can add his own implementation to report the file name and line number.
* ex: printf(“Wrong parameters value: file %s on line %d\r\n“ file line)
* @retval void None
* @par Required preconditions:
* None
* @par Called functions:
* None
*/
#ifdef FULL_ASSERT
void assert_failed(u8 *file u16 line)
#else
void assert_failed(void)
#endif
{
/* Add your o
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 575 2014-11-24 17:28 STM8芯片S系列的完整固件库\STM8 Debug.txt
文件 7290 2014-11-24 20:25 STM8芯片S系列的完整固件库\Stm8-Lib 目录.txt
文件 712704 2011-04-18 13:20 STM8芯片S系列的完整固件库\Stm8S 库函数生成软件.exe
文件 3192 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_ContinuousConversion\main.c
文件 1898 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_ContinuousConversion\main.h
文件 2360 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_ContinuousConversion\readme.txt
文件 7882 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_ContinuousConversion\stm8s_conf.h
文件 17472 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_ContinuousConversion\stm8s_it.c
文件 4629 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_ContinuousConversion\stm8s_it.h
文件 5358 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_ContinuousConversion\stm8_interrupt_vector.c
文件 3617 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_TriggerConversion\main.c
文件 1895 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_TriggerConversion\main.h
文件 2423 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_TriggerConversion\readme.txt
文件 7876 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_TriggerConversion\stm8s_conf.h
文件 17475 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_TriggerConversion\stm8s_it.c
文件 4629 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_TriggerConversion\stm8s_it.h
文件 5358 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\ADC2\ADC2_TriggerConversion\stm8_interrupt_vector.c
文件 8515 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\AWU\AWU_ActiveHaltMode\main.c
文件 2863 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\AWU\AWU_ActiveHaltMode\readme.txt
文件 7858 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\AWU\AWU_ActiveHaltMode\stm8s_conf.h
文件 16366 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\AWU\AWU_ActiveHaltMode\stm8s_it.c
文件 4629 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\AWU\AWU_ActiveHaltMode\stm8s_it.h
文件 5358 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\AWU\AWU_ActiveHaltMode\stm8_interrupt_vector.c
文件 8338 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\main.c
文件 3192 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\readme.txt
文件 7845 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\stm8s_conf.h
文件 16454 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\stm8s_it.c
文件 4629 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\stm8s_it.h
文件 5358 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\stm8_interrupt_vector.c
文件 9487 2009-03-02 09:59 STM8芯片S系列的完整固件库\STM8S固件函数库\FWLib\examples\CAN\Networking\main.c
............此处省略481个文件信息
- 上一篇:导波场论 柯林
- 下一篇:控制工程基础课后习题答案
评论
共有 条评论