/**
******************************************************************************
* @file stm32f10x_tim.c
* @author MCD Application Team
* @version V3.0.0
* @date 04/06/2009
* @brief This file provides all the TIM firmware functions.
******************************************************************************
* @copy
*
* 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.
*
* <h2><center>© COPYRIGHT 2009 STMicroelectronics</center></h2>
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_tim.h"
#include "stm32f10x_rcc.h"
/** @addtogroup StdPeriph_Driver
* @{
*/
/** @defgroup TIM
* @brief TIM driver modules
* @{
*/
/** @defgroup TIM_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup TIM_Private_Defines
* @{
*/
/* ---------------------- TIM registers bit mask ------------------------ */
#define CR1_CEN_Set ((uint16_t)0x0001)
#define CR1_CEN_Reset ((uint16_t)0x03FE)
#define CR1_UDIS_Set ((uint16_t)0x0002)
#define CR1_UDIS_Reset ((uint16_t)0x03FD)
#define CR1_URS_Set ((uint16_t)0x0004)
#define CR1_URS_Reset ((uint16_t)0x03FB)
#define CR1_OPM_Reset ((uint16_t)0x03F7)
#define CR1_CounterMode_Mask ((uint16_t)0x038F)
#define CR1_ARPE_Set ((uint16_t)0x0080)
#define CR1_ARPE_Reset ((uint16_t)0x037F)
#define CR1_CKD_Mask ((uint16_t)0x00FF)
#define CR2_CCPC_Set ((uint16_t)0x0001)
#define CR2_CCPC_Reset ((uint16_t)0xFFFE)
#define CR2_CCUS_Set ((uint16_t)0x0004)
#define CR2_CCUS_Reset ((uint16_t)0xFFFB)
#define CR2_CCDS_Set ((uint16_t)0x0008)
#define CR2_CCDS_Reset ((uint16_t)0xFFF7)
#define CR2_MMS_Mask ((uint16_t)0xFF8F)
#define CR2_TI1S_Set ((uint16_t)0x0080)
#define CR2_TI1S_Reset ((uint16_t)0xFF7F)
#define CR2_OIS1_Reset ((uint16_t)0x7EFF)
#define CR2_OIS1N_Reset ((uint16_t)0x7DFF)
#define CR2_OIS2_Reset ((uint16_t)0x7BFF)
#define CR2_OIS2N_Reset ((uint16_t)0x77FF)
#define CR2_OIS3_Reset ((uint16_t)0x6FFF)
#define CR2_OIS3N_Reset ((uint16_t)0x5FFF)
#define CR2_OIS4_Reset ((uint16_t)0x3FFF)
#define SMCR_SMS_Mask ((uint16_t)0xFFF8)
#define SMCR_ETR_Mask ((uint16_t)0x00FF)
#define SMCR_TS_Mask ((uint16_t)0xFF8F)
#define SMCR_MSM_Reset ((uint16_t)0xFF7F)
#define SMCR_ECE_Set ((uint16_t)0x4000)
#define CCMR_CC13S_Mask ((uint16_t)0xFFFC)
#define CCMR_CC24S_Mask ((uint16_t)0xFCFF)
#define CCMR_TI13Direct_Set ((uint16_t)0x0001)
#define CCMR_TI24Direct_Set ((uint16_t)0x0100)
#define CCMR_OC13FE_Reset ((uint16_t)0xFFFB)
#define CCMR_OC24FE_Reset ((uint16_t)0xFBFF)
#define CCMR_OC13PE_Reset ((uint16_t)0xFFF7)
#define CCMR_OC24PE_Reset ((uint16_t)0xF7FF)
#define CCMR_OC13M_Mask ((uint16_t)0xFF8F)
#define CCMR_OC24M_Mask ((uint16_t)0x8FFF)
#define CCMR_OC13CE_Reset ((uint16_t)0xFF7F)
#define CCMR_OC24CE_Reset ((uint16_t)0x7FFF)
#define CCMR_IC13PSC_Mask ((uint16_t)0xFFF3)
#define CCMR_IC24PSC_Mask ((uint16_t)0xF3FF)
#define CCMR_IC13F_Mask ((uint16_t)0xFF0F)
#define CCMR_IC24F_Mask ((uint16_t)0x0FFF)
#define CCMR_Offset ((uint16_t)0x0018)
#define CCER_CCE_Set ((uint16_t)0x0001)
#define CCER_CCNE_Set ((uint16_t)0x0004)
#define CCER_CC1P_Reset ((uint16_t)0xFFFD)
#define CCER_CC2P_Reset ((uint16_t)0xFFDF)
#define CCER_CC3P_Reset ((uint16_t)0xFDFF)
#define CCER_CC4P_Reset ((uint16_t)0xDFFF)
#define CCER_CC1NP_Reset ((uint16_t)0xFFF7)
#define CCER_CC2NP_Reset ((uint16_t)0xFF7F)
#define CCER_CC3NP_Reset ((uint16_t)0xF7FF)
#define CCER_CC1E_Set ((uint16_t)0x0001)
#define CCER_CC1E_Reset ((uint16_t)0xFFFE)
#define CCER_CC1NE_Reset ((uint16_t)0xFFFB)
#define CCER_CC2E_Set ((uint16_t)0x0010)
#define CCER_CC2E_Reset ((uint16_t)0xFFEF)
#define CCER_CC2NE_Reset ((uint16_t)0xFFBF)
#define CCER_CC3E_Set ((uint16_t)0x0100)
#define CCER_CC3E_Reset ((uint16_t)0xFEFF)
#define CCER_CC3NE_Reset ((uint16_t)0xFBFF)
#define CCER_CC4E_Set ((uint16_t)0x1000)
#define CCER_CC4E_Reset ((uint16_t)0xEFFF)
#define BDTR_MOE_Set ((uint16_t)0x8000)
#define BDTR_MOE_Reset ((uint16_t)0x7FFF)
/**
* @}
*/
/** @defgroup TIM_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup TIM_Private_Variables
* @{
*/
/**
* @}
*/
/** @defgroup TIM_Private_FunctionPrototypes
* @{
*/
static void TI1_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection,
uint16_t TIM_ICFilter);
static void TI2_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection,
uint16_t TIM_ICFilter);
static void TI3_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection,
uint16_t TIM_ICFilter);
static void TI4_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection,
uint16_t TIM_ICFilter);
/**
* @}
*/
/** @defgroup TIM_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup TIM_Private_Variables
* @{
*/
/**
* @}
*/
/** @defgroup TIM_Private_FunctionPrototypes
* @{
*/
/**
* @}
*/
/** @defgroup TIM_Private_Functions
* @{
*/
/**
* @brief Deinitializes the TIMx peripheral registers to their default
* reset values.
* @param TIMx: where x can be 1 to 8 to select the TIM peripheral.
* @retval : None
*/
void TIM_DeInit(TIM_TypeDef* TIMx)
{
/* Check the parameters */
assert_param(IS_TIM_ALL_PERIPH(TIMx));
switch (*(uint32_t*)&TIMx)
{
case TIM1_BASE:
RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, ENABLE);
RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, DISABLE);
break;
case TIM2_BASE:
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, ENABLE);
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, DISABLE);
break;
case TIM3_BASE:
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, ENABLE);
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, DISABLE);
break;
case TIM4_BASE:
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, ENABLE);
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, DISABLE);
break;
case TIM5_BASE:
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, ENABLE);
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, DISABLE);
break;
case TIM6_BASE:
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE);
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE);
break;
case TIM7_BASE:
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE);
RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE);
break;
case TIM8_BASE:
RCC_APB2PeriphResetCmd(RCC_A
没有合适的资源?快使用搜索试试~ 我知道了~
基于蓝牙的温湿度与气压监测系统_温湿度蓝牙透传气压_环境监测_监测_
共323个文件
o:65个
d:65个
crf:61个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 4 下载量 188 浏览量
2021-09-29
10:21:03
上传
评论 4
收藏 8.96MB ZIP 举报
温馨提示
该设计以短距离无线连接、便捷使用为基础,采用蓝牙的无线连接进行数据的传输和数据的解析,具有减少有线连接的优势之处。系统由显示部分、传感器数据采集部分、按键部分、蓝牙部分、APP数据接收部分组成,可以实现温度、湿度、气压的实时监测,APP端可以实时查看当前环境的变化。
资源推荐
资源详情
资源评论
收起资源包目录
基于蓝牙的温湿度与气压监测系统_温湿度蓝牙透传气压_环境监测_监测_ (323个子文件)
stm32f103-project.uvguix.Administrator 76KB
stm32f103-project.axf 480KB
stm32f103-project_sct.Bak 479B
stm32f10x_tim.c 100KB
cJSON.c 72KB
stm32f10x_adc.c 46KB
stm32f10x_i2c.c 36KB
stm32f10x_fsmc.c 34KB
stm32f10x_usart.c 34KB
stm32f10x_rcc.c 33KB
stm32f10x_can.c 30KB
stm32f10x_sdio.c 28KB
stm32f10x_spi.c 27KB
stm32f10x_dma.c 27KB
stm32f10x_flash.c 26KB
system_stm32f10x.c 24KB
stm32f10x_gpio.c 17KB
startup_stm32f10x_hd.c 16KB
core_cm3.c 16KB
rtc_driver.c 15KB
main.c 14KB
stm32f10x_dac.c 13KB
startup_stm32f10x_md.c 13KB
startup_stm32f10x_ld.c 12KB
oled.c 9KB
stm32f10x_pwr.c 9KB
dht11_driver.c 9KB
stm32f10x_rtc.c 8KB
stm32f10x_bkp.c 8KB
misc.c 7KB
stm32f10x_exti.c 7KB
eeprom.c 7KB
stm32f10x_it.c 6KB
stm32f10x_wwdg.c 5KB
i2c_driver.c 5KB
BMP180.c 5KB
stm32f10x_iwdg.c 5KB
stm32f10x_dbgmcu.c 4KB
systick.c 4KB
stm32f10x_crc.c 3KB
led.c 3KB
uart1.c 3KB
myiic.c 2KB
uart2.c 2KB
key.c 2KB
adc.c 2KB
spi_driver.c 1KB
tim2.c 1KB
tim3.c 1KB
sys.c 532B
rcc.c 525B
wkup.c 314B
dht11_driver.crf 351KB
main.crf 349KB
bmp180.crf 334KB
stm32f10x_tim.crf 334KB
bmp180_driver.crf 332KB
eeprom.crf 327KB
rtc_driver.crf 327KB
led.crf 323KB
i2c_driver.crf 321KB
stm32f10x_it.crf 321KB
key.crf 321KB
uart1.crf 321KB
uart2.crf 321KB
stm32f10x_adc.crf 321KB
stm32f10x_rcc.crf 321KB
stm32f10x_can.crf 321KB
stm32f10x_flash.crf 320KB
stm32f10x_i2c.crf 319KB
stm32f10x_fsmc.crf 319KB
oled.crf 319KB
stm32f10x_usart.crf 319KB
stm32f10x_sdio.crf 318KB
stm32f10x_spi.crf 318KB
myiic.crf 317KB
stm32f10x_gpio.crf 317KB
stm32f10x_dma.crf 316KB
bsp_config.crf 316KB
stm32f10x_dac.crf 315KB
stm32f10x_pwr.crf 315KB
stm32f10x_rtc.crf 315KB
stm32f10x_bkp.crf 315KB
send_data.crf 314KB
system_stm32f10x.crf 314KB
stm32f10x_exti.crf 314KB
sys.crf 314KB
adc.crf 314KB
stm32f10x_wwdg.crf 314KB
misc.crf 314KB
spi_driver.crf 314KB
systick.crf 314KB
stm32f10x_iwdg.crf 314KB
tim3.crf 314KB
stm32f10x_crc.crf 314KB
tim2.crf 313KB
stm32f10x_dbgmcu.crf 313KB
rcc.crf 313KB
wkup.crf 313KB
cjson.crf 57KB
共 323 条
- 1
- 2
- 3
- 4
资源评论
- 沉默有染A2022-03-28用户下载后在一定时间内未进行评价,系统默认好评。
- qq_186466672023-04-24资源使用价值高,内容详实,给了我很多新想法,感谢大佬分享~
- m0_705140682024-05-27这个资源内容超赞,对我来说很有价值,很实用,感谢大佬分享~
- 2301_773215762024-01-05终于找到了超赞的宝藏资源,果断冲冲冲,支持!
周玉坤举重
- 粉丝: 63
- 资源: 4779
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 3层别墅图纸D086-三层-15.11&16.30米-施工图.dwg
- TCP 三次握手(Three-Way Handshake) SYN 握手:客户端发送一个带有 SYN(同步序列编号)标志的 T
- 农村小院别墅图D085-三层-15.50&13.80米-施工图.dwg
- tcp三次握手四次挥手
- tcp三次握手四次挥手
- 三层农村小别墅图纸D084-三层-14.00&13.90米-施工图.dwg
- 三层独栋别墅编号D083-三层-14.60&11.50米-施工图.dwg
- 3层独栋别墅D082-三层-10.40&15.90米-施工图.dwg
- 3层独栋别墅编号D081-三层-11.00&11.60米-施工图.dwg
- 3层独栋别墅占地面积140平方米别墅结构.dwg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功