资源简介
STM8S 固件库 里面有很多例子 ,都是使用库函数来操作;
代码片段和文件信息
/**
******************************************************************************
* @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.1
* @date 06/05/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
* 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);
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval
* None
*/
void assert_failed(u8* file u32 line)
{
/* 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) */
/* Infinite loop */
while (1)
{
}
}
#e
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-02-18 16:29 STM8S固件库\
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\ADC2\
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\ADC2\ADC2_ContinuousConversion\
文件 3111 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_ContinuousConversion\main.c
文件 1898 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_ContinuousConversion\main.h
文件 2507 2009-05-19 10:03 STM8S固件库\FWLib\examples\ADC2\ADC2_ContinuousConversion\readme.txt
文件 7795 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_ContinuousConversion\stm8s_conf.h
文件 18032 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_ContinuousConversion\stm8s_it.c
文件 4774 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_ContinuousConversion\stm8s_it.h
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\ADC2\ADC2_TriggerConversion\
文件 3536 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_TriggerConversion\main.c
文件 1895 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_TriggerConversion\main.h
文件 2575 2009-05-19 10:03 STM8S固件库\FWLib\examples\ADC2\ADC2_TriggerConversion\readme.txt
文件 7789 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_TriggerConversion\stm8s_conf.h
文件 18035 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_TriggerConversion\stm8s_it.c
文件 4774 2009-06-05 08:18 STM8S固件库\FWLib\examples\ADC2\ADC2_TriggerConversion\stm8s_it.h
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\AWU\
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\AWU\AWU_ActiveHaltMode\
文件 8583 2009-06-05 08:18 STM8S固件库\FWLib\examples\AWU\AWU_ActiveHaltMode\main.c
文件 2930 2009-05-19 10:03 STM8S固件库\FWLib\examples\AWU\AWU_ActiveHaltMode\readme.txt
文件 7767 2009-06-05 08:18 STM8S固件库\FWLib\examples\AWU\AWU_ActiveHaltMode\stm8s_conf.h
文件 17047 2009-06-05 08:18 STM8S固件库\FWLib\examples\AWU\AWU_ActiveHaltMode\stm8s_it.c
文件 4774 2009-06-05 08:18 STM8S固件库\FWLib\examples\AWU\AWU_ActiveHaltMode\stm8s_it.h
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\BEEP\
目录 0 2017-02-18 16:29 STM8S固件库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\
文件 8700 2009-06-05 08:18 STM8S固件库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\main.c
文件 3329 2009-05-19 10:03 STM8S固件库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\readme.txt
文件 7758 2009-06-05 08:18 STM8S固件库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\stm8s_conf.h
文件 17124 2009-06-05 08:18 STM8S固件库\FWLib\examples\BEEP\BEEP_3SignalsGeneration\stm8s_it.c
............此处省略405个文件信息
- 上一篇:TIMIT语音数据库
- 下一篇:STM32与FPGA进行16位SPI通信
相关资源
- STM8S003 IAR环境库函数模拟串口
- STM8s003 IAR库函数定时器1输入捕获功能
- STM32固件库使用手册_v3.5版本
- STM8S103F3封装库ddb(schpcb)
- SMT32F4函数固件库手册——新库
- sx1278+stm8s lora通信及信号强度提取
- 基于STM8S103F3P6的模拟串口程序
- 最新STM8L101固件库
- STM8S207R8(DS18B20)源代码
- 基于STM8的OLED驱动
- stm8s105 数据手册
- STM32固件库使用手册中文版
- stm8s_demo
- STM8s读取AM2303温湿度传感器MODBUS协议
- STM8S103F3例程资料
- stm8s触摸按键库2.5版本
- MODBUS STM8S
- stm8s最新库函数手册
- 采用STM8S的无刷直流电机控制系统的设
- stm8s官方例程
- STM32固件库函数说明手册中文版,ST
- stm8s系列中文参考手册
- STM8S003工程模版
- STM32F1官方固件库
- STM32F10X参考手册与固件库使用手册全
- proe国标紧固件库
- STM32中文固件库+中文芯片手册(完全
- STM32F10x_StdPeriph_Lib_V3.5.0 STM32F10x固件库
- STM32F0xx固件库
- 基于固件库的STM32F103ZET6工程模板ARM
评论
共有 条评论