资源简介
使用st官方的库函数编写的关于485通信的程序 可以进行收发
代码片段和文件信息
/**
******************************************************************************
* @file stm8s_adc1.c
* @author MCD Application Team
* @version V2.1.0
* @date 18-November-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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2006-01-02 02:02 26-Uart3(RS485)\
目录 0 2006-01-02 02:02 26-Uart3(RS485)\FWlib\
目录 0 2006-01-02 02:02 26-Uart3(RS485)\FWlib\inc\
文件 115797 2012-12-14 23:11 26-Uart3(RS485)\FWlib\inc\stm8s.h
文件 15026 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_adc1.h
文件 11473 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_adc2.h
文件 4926 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_awu.h
文件 3495 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_beep.h
文件 25587 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_can.h
文件 16968 2012-10-21 22:51 26-Uart3(RS485)\FWlib\inc\stm8s_clk.h
文件 4625 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_exti.h
文件 13814 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_flash.h
文件 6270 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_gpio.h
文件 27725 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_i2c.h
文件 6766 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_itc.h
文件 4307 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_iwdg.h
文件 2834 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_rst.h
文件 13062 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_spi.h
文件 26735 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_tim1.h
文件 14088 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_tim2.h
文件 12917 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_tim3.h
文件 5299 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_tim4.h
文件 19890 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_tim5.h
文件 9524 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_tim6.h
文件 16529 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_uart1.h
文件 19058 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_uart2.h
文件 15311 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_uart3.h
文件 2478 2012-10-12 23:39 26-Uart3(RS485)\FWlib\inc\stm8s_wwdg.h
目录 0 2006-01-02 02:02 26-Uart3(RS485)\FWlib\src\
文件 23519 2012-10-12 23:39 26-Uart3(RS485)\FWlib\src\stm8s_adc1.c
文件 13702 2012-10-12 23:39 26-Uart3(RS485)\FWlib\src\stm8s_adc2.c
............此处省略59个文件信息
- 上一篇:将wav格式转换为PCM格式
- 下一篇:6种非常精美的Web前端搜索框展示四
相关资源
- 基于STM8的温湿度传感器DHT11驱动代码
- stm8s103触摸按键
- 基于80C51的RS485双机通信程序_01
- RS232-TTl-RS485转接口电路
- STM8S003 cc115l cc113l
- SPI从机通信设置
- 基于pic16f1947 和ADM2483、rs485电路发送接
- STM8L低功耗测试报告
- RS485一对四双向通信Proteus仿真+Keil收发
- 一个自动收发的RS485电路图
- stm8 IO口模拟串口程序
- 有感无刷电机驱动程序 已调试通过
- stm8 代码生成器
- STM8S 0.96寸OLED4线SPI驱动程序
- BC95模块代码(For STM8)
- FT4232设置为RS485接口输出教程.docx
- 基于51单片机RS485多机通讯
- 基于51单片机的RS485的从机系统的设计
- 基于51单片机的RS485从机系统设计
- STM8S模拟串口,双串口,虚拟串口
- STM8S003单片机ADC多通道采样
- STM8S003模拟IIC总线读取PCF8563
- STM8S003模拟串口程序
- STM8S003F使用I/O口模拟串口一发送数据
- AD Altium Designer STM8 STM32 库
- verilog rs485
- S7-200与RS485设备通讯
- 三菱PLC与变频器通讯(2台
- 51单片机实现的RS485通讯程序
- 富士G11和224CN RS485通信纸机传动.rar
评论
共有 条评论