资源简介
STM8开发例程,用的开发环境为IAR ,例程很全,常用的外设模块里面都有,还有SD卡,显示屏
代码片段和文件信息
/**
******************************************************************************
* @file stm8s_adc1.c
* @author MCD Application Team
* @version V2.0.0
* @date 25-February-2011
* @brief This file contains all the functions/macros for the ADC1 peripheral.
******************************************************************************
* @attention
*
* 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 2011 STMicroelectronics
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include “stm8s_adc1.h“
/** @addtogroup STM8S_StdPeriph_Driver
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/* Public functions ----------------------------------------------------------*/
/**
* @addtogroup ADC1_Public_Functions
* @{
*/
/**
* @brief Deinitializes the ADC1 peripheral registers to their default reset
* values.
* @param None
* @retval None
*/
void ADC1_DeInit(void)
{
ADC1->CSR = ADC1_CSR_RESET_VALUE;
ADC1->CR1 = ADC1_CR1_RESET_VALUE;
ADC1->CR2 = ADC1_CR2_RESET_VALUE;
ADC1->CR3 = ADC1_CR3_RESET_VALUE;
ADC1->TDRH = ADC1_TDRH_RESET_VALUE;
ADC1->TDRL = ADC1_TDRL_RESET_VALUE;
ADC1->HTRH = ADC1_HTRH_RESET_VALUE;
ADC1->HTRL = ADC1_HTRL_RESET_VALUE;
ADC1->LTRH = ADC1_LTRH_RESET_VALUE;
ADC1->LTRL = ADC1_LTRL_RESET_VALUE;
ADC1->AWCRH = ADC1_AWCRH_RESET_VALUE;
ADC1->AWCRL = ADC1_AWCRL_RESET_VALUE;
}
/**
* @brief Initializes the ADC1 peripheral according to the specified parameters
* @param ADC1_ConversionMode: specifies the conversion mode
* can be one of the values of @ref ADC1_ConvMode_TypeDef.
* @param ADC1_Channel: specifies the channel to convert
* can be one of the values of @ref ADC1_Channel_TypeDef.
* @param ADC1_PrescalerSelection: specifies the ADC1 prescaler
* can be one of the values of @ref ADC1_PresSel_TypeDef.
* @param ADC1_ExtTrigger: specifies th
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 115045 2011-12-16 12:55 1-STM8S_Demo\FWlib\inc\stm8s.h
----------- --------- ---------- ----- ----
115045 1
相关资源
- 普通IO口模拟spi,stm8程序
- 基于STM32F103ZET6的1.8寸SPI_TFT程序内含模
- cadence pspice 器件库
- HSPICE Reference Manual Commands and Control O
- 0.96寸OLED+原子STM32F4+IIC通信
- 基于STM32的SPI双机通讯(含主从机)
- dac8830的驱动程序,乒乓缓存
- STM32+6脚OLEDSPI法
- cadence16.5 pspice教程全集
- 微软官方推荐.NET平台的爬虫软件,
- TLE5012B基于STM32F103 SPI接口的驱动程序
- 持续交付平台Spinnaker.zip
- scrapy爬虫完整案例.zip
- pspice语法 学习教程 电路仿真语言
- cdcm6208_spi
- STM32F103VE_NRF24L01_GPIO模拟SPI通讯程序
- FPGA实现IIC通信.zip
- Spire.Doc.dll
- STM32读取_电量管理芯片_BQ76930芯片电压
- 好几种接口的verilog程序,包括caneth
- Spiking神经网络的研究及其在图像分割
- STM32 F103 通过SPI口读取RFID的
- IIC ip核 一个是ALTERA官网的 有一个是网
- 第14 章 电机控制PWM.pdf
- DSPIC无刷直流电机调速控制及其实验研
- The Spin Model Checker_Primer and Reference Ma
- IR公司元器件SPICE模型
- BH1750FVI STM32F103 HAL库 硬件IIC例程
- KMSpico v10.1.7
- STM32F103系列采用模拟IIC方式驱动了B
评论
共有 条评论