首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

基于stm34f103c8t6的小夜灯

硬件开发 6.57MB 10 需要积分: 1
立即下载

资源介绍:

初学者
/** ****************************************************************************** * @file stm32f10x_tim.c * @author MCD Application Team * @version V3.5.0 * @date 11-March-2011 * @brief This file provides all the TIM firmware functions. ****************************************************************************** * @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 "stm32f10x_tim.h" #include "stm32f10x_rcc.h" /** @addtogroup STM32F10x_StdPeriph_Driver * @{ */ /** @defgroup TIM * @brief TIM driver modules * @{ */ /** @defgroup TIM_Private_TypesDefinitions * @{ */ /** * @} */ /** @defgroup TIM_Private_Defines * @{ */ /* ---------------------- TIM registers bit mask ------------------------ */ #define SMCR_ETR_Mask ((uint16_t)0x00FF) #define CCMR_Offset ((uint16_t)0x0018) #define CCER_CCE_Set ((uint16_t)0x0001) #define CCER_CCNE_Set ((uint16_t)0x0004) /** * @} */ /** @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 17 to select the TIM peripheral. * @retval None */ void TIM_DeInit(TIM_TypeDef* TIMx) { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); if (TIMx == TIM1) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, DISABLE); } else if (TIMx == TIM2) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, DISABLE); } else if (TIMx == TIM3) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, DISABLE); } else if (TIMx == TIM4) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, DISABLE); } else if (TIMx == TIM5) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, DISABLE); } else if (TIMx == TIM6) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE); } else if (TIMx == TIM7) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE); } else if (TIMx == TIM8) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, DISABLE); } else if (TIMx == TIM9) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, DISABLE); } else if (TIMx == TIM10) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, DISABLE); } else if (TIMx == TIM11) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, DISABLE); } else if (TIMx == TIM12) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, DISABLE); } else if (TIMx == TIM13) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, DISABLE); } else if (TIMx == TIM14) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, DISABLE); } else if (TIMx == TIM15) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, DISABLE); } else if (TIMx == TIM16) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, DISABLE); } else { if (TIMx == TIM17) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, DISABLE); } } } /** * @brief Initializes the TIMx Time Base Unit peripheral according to * the specified parameters in the TIM_TimeBaseInitStruct. * @param TIMx: where x can be 1 to 17 to select the TIM peripheral. * @param TIM_TimeBaseInitStruct: pointer to a TIM_TimeBaseInitTypeDef * structure that contains the configuration information for the * specified TIM peripheral. * @retval None */ void TIM_TimeBaseInit(TIM_TypeDef* TIMx, TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct) { uint16_t tmpcr1 = 0; /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; if((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM2) || (TIMx == TIM3)|| (TIMx == TIM4) || (TIMx == TIM5)) { /* Select the Counter Mode */ tmpcr1 &= (uint16_t)(~((uint16_t)(TIM_CR1_DIR | TIM_CR1_CMS))); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; } if((TIMx != TIM6) && (TIMx != TIM7)) { /* Set the clock division */ tmpcr1 &= (uint16_t)(~((uint16_t)TIM_CR1_CKD)); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; } TIMx->CR1 = tmpcr1; /* Set the Autoreload value */ TIMx->ARR = TIM_TimeBaseInitStruct->TIM_Period ; /* Set the Prescaler value */ TIMx->PSC = TIM_TimeBaseInitStruct->TIM_Prescaler; if ((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM15)|| (TIMx == TIM16) || (TIMx == TIM17)) { /* Set the Repetition Counter value */ TIMx->RCR = TIM_TimeBaseInitStruct->TIM_RepetitionCounter; } /* Generate an update event to reload the Prescaler and the Repetition counter values immediately */ TIMx->EGR = TIM_PSCReloadMode_Immediate; } /** * @brief Initializes the TIMx Channel1 according to the specified * parameters in the TIM_OCInitStruct. * @param TIMx: where x can be 1 to 17 except 6 and 7 to select the TIM peripheral. * @param TIM_OCInitStru

资源文件列表:

小夜灯.zip 大约有206个文件
  1. DebugConfig/
  2. DebugConfig/Target_1_STM32F103C8_1.0.0.dbgconf 6.79KB
  3. EventRecorderStub.scvd 339B
  4. Hardware/
  5. Hardware/AD.c 1.62KB
  6. Hardware/AD.h 101B
  7. Hardware/Key.c 2.12KB
  8. Hardware/Key.h 135B
  9. Hardware/LED.c 843B
  10. Hardware/LED.h 134B
  11. Hardware/OLED.c 49.67KB
  12. Hardware/OLED.h 2.55KB
  13. Hardware/OLED_Data.c 17.98KB
  14. Hardware/OLED_Data.h 796B
  15. Hardware/PWM.c 2.94KB
  16. Hardware/PWM.h 109B
  17. keilkill.bat 374B
  18. Library/
  19. Library/misc.c 6.88KB
  20. Library/misc.h 8.77KB
  21. Library/stm32f10x_adc.c 46.09KB
  22. Library/stm32f10x_adc.h 21.18KB
  23. Library/stm32f10x_bkp.c 8.26KB
  24. Library/stm32f10x_bkp.h 7.38KB
  25. Library/stm32f10x_can.c 44.05KB
  26. Library/stm32f10x_can.h 26.91KB
  27. Library/stm32f10x_cec.c 11.38KB
  28. Library/stm32f10x_cec.h 6.42KB
  29. Library/stm32f10x_crc.c 3.27KB
  30. Library/stm32f10x_crc.h 2.11KB
  31. Library/stm32f10x_dac.c 18.64KB
  32. Library/stm32f10x_dac.h 14.88KB
  33. Library/stm32f10x_dbgmcu.c 5.03KB
  34. Library/stm32f10x_dbgmcu.h 3.73KB
  35. Library/stm32f10x_dma.c 28.91KB
  36. Library/stm32f10x_dma.h 20.27KB
  37. Library/stm32f10x_exti.c 6.8KB
  38. Library/stm32f10x_exti.h 6.66KB
  39. Library/stm32f10x_flash.c 61.08KB
  40. Library/stm32f10x_flash.h 24.85KB
  41. Library/stm32f10x_fsmc.c 34.65KB
  42. Library/stm32f10x_fsmc.h 26.38KB
  43. Library/stm32f10x_gpio.c 22.68KB
  44. Library/stm32f10x_gpio.h 19.7KB
  45. Library/stm32f10x_i2c.c 44.71KB
  46. Library/stm32f10x_i2c.h 29.33KB
  47. Library/stm32f10x_iwdg.c 4.8KB
  48. Library/stm32f10x_iwdg.h 3.74KB
  49. Library/stm32f10x_pwr.c 8.55KB
  50. Library/stm32f10x_pwr.h 4.28KB
  51. Library/stm32f10x_rcc.c 50.07KB
  52. Library/stm32f10x_rcc.h 29.74KB
  53. Library/stm32f10x_rtc.c 8.4KB
  54. Library/stm32f10x_rtc.h 3.77KB
  55. Library/stm32f10x_sdio.c 28.25KB
  56. Library/stm32f10x_sdio.h 21.35KB
  57. Library/stm32f10x_spi.c 29.52KB
  58. Library/stm32f10x_spi.h 17.31KB
  59. Library/stm32f10x_tim.c 106.6KB
  60. Library/stm32f10x_tim.h 51.2KB
  61. Library/stm32f10x_usart.c 37.41KB
  62. Library/stm32f10x_usart.h 16.16KB
  63. Library/stm32f10x_wwdg.c 5.6KB
  64. Library/stm32f10x_wwdg.h 2.9KB
  65. Listings/
  66. Listings/Project.map 165.38KB
  67. Listings/startup_stm32f10x_md.lst 40.47KB
  68. Objects/
  69. Objects/ad.crf 338.48KB
  70. Objects/ad.d 1.25KB
  71. Objects/ad.o 371.25KB
  72. Objects/core_cm3.crf 3.85KB
  73. Objects/core_cm3.d 106B
  74. Objects/core_cm3.o 10.91KB
  75. Objects/delay.crf 338.11KB
  76. Objects/delay.d 1.34KB
  77. Objects/delay.o 371.72KB
  78. Objects/ExtDll.iex 19B
  79. Objects/key.crf 338.56KB
  80. Objects/key.d 1.31KB
  81. Objects/key.o 371.71KB
  82. Objects/led.crf 338.29KB
  83. Objects/led.d 1.28KB
  84. Objects/led.o 373.14KB
  85. Objects/main.crf 342.87KB
  86. Objects/main.d 1.52KB
  87. Objects/main.o 374.82KB
  88. Objects/misc.crf 338.78KB
  89. Objects/misc.d 1.34KB
  90. Objects/misc.o 374.79KB
  91. Objects/oled.crf 370.87KB
  92. Objects/oled.d 1.62KB
  93. Objects/oled.o 447.96KB
  94. Objects/oled_data.crf 3.81KB
  95. Objects/oled_data.d 157B
  96. Objects/oled_data.o 13.52KB
  97. Objects/Project.axf 312.95KB
  98. Objects/Project.build_log.htm 1.57KB
  99. Objects/Project.htm 50.2KB
  100. Objects/Project.lnp 1.19KB
  101. Objects/Project.sct 479B
  102. Objects/Project_Target 1.dep 56.27KB
  103. Objects/pwm.crf 338.42KB
  104. Objects/pwm.d 1.28KB
  105. Objects/pwm.o 371.09KB
  106. Objects/startup_stm32f10x_md.d 64B
  107. Objects/startup_stm32f10x_md.o 5.87KB
  108. Objects/stm32f10x_adc.crf 345.79KB
  109. Objects/stm32f10x_adc.d 1.63KB
  110. Objects/stm32f10x_adc.o 421.08KB
  111. Objects/stm32f10x_bkp.crf 339.7KB
  112. Objects/stm32f10x_bkp.d 1.63KB
  113. Objects/stm32f10x_bkp.o 384.49KB
  114. Objects/stm32f10x_can.crf 347.36KB
  115. Objects/stm32f10x_can.d 1.63KB
  116. Objects/stm32f10x_can.o 406.5KB
  117. Objects/stm32f10x_cec.crf 340.24KB
  118. Objects/stm32f10x_cec.d 1.63KB
  119. Objects/stm32f10x_cec.o 387.07KB
  120. Objects/stm32f10x_crc.crf 338.35KB
  121. Objects/stm32f10x_crc.d 1.63KB
  122. Objects/stm32f10x_crc.o 375.79KB
  123. Objects/stm32f10x_dac.crf 340.37KB
  124. Objects/stm32f10x_dac.d 1.63KB
  125. Objects/stm32f10x_dac.o 385.13KB
  126. Objects/stm32f10x_dbgmcu.crf 338.14KB
  127. Objects/stm32f10x_dbgmcu.d 1.73KB
  128. Objects/stm32f10x_dbgmcu.o 371.93KB
  129. Objects/stm32f10x_dma.crf 341.82KB
  130. Objects/stm32f10x_dma.d 1.63KB
  131. Objects/stm32f10x_dma.o 384.58KB
  132. Objects/stm32f10x_exti.crf 339.33KB
  133. Objects/stm32f10x_exti.d 1.66KB
  134. Objects/stm32f10x_exti.o 378.82KB
  135. Objects/stm32f10x_flash.crf 345.63KB
  136. Objects/stm32f10x_flash.d 1.7KB
  137. Objects/stm32f10x_flash.o 410.11KB
  138. Objects/stm32f10x_fsmc.crf 344.17KB
  139. Objects/stm32f10x_fsmc.d 1.66KB
  140. Objects/stm32f10x_fsmc.o 395.85KB
  141. Objects/stm32f10x_gpio.crf 342.2KB
  142. Objects/stm32f10x_gpio.d 1.66KB
  143. Objects/stm32f10x_gpio.o 394.71KB
  144. Objects/stm32f10x_i2c.crf 344.57KB
  145. Objects/stm32f10x_i2c.d 1.63KB
  146. Objects/stm32f10x_i2c.o 415.31KB
  147. Objects/stm32f10x_it.crf 338.27KB
  148. Objects/stm32f10x_it.d 1.59KB
  149. Objects/stm32f10x_it.o 379.52KB
  150. Objects/stm32f10x_iwdg.crf 338.45KB
  151. Objects/stm32f10x_iwdg.d 1.66KB
  152. Objects/stm32f10x_iwdg.o 375.77KB
  153. Objects/stm32f10x_pwr.crf 339.61KB
  154. Objects/stm32f10x_pwr.d 1.63KB
  155. Objects/stm32f10x_pwr.o 380.41KB
  156. Objects/stm32f10x_rcc.crf 345.69KB
  157. Objects/stm32f10x_rcc.d 1.63KB
  158. Objects/stm32f10x_rcc.o 414.09KB
  159. Objects/stm32f10x_rtc.crf 339.61KB
  160. Objects/stm32f10x_rtc.d 1.63KB
  161. Objects/stm32f10x_rtc.o 386.61KB
  162. Objects/stm32f10x_sdio.crf 342.8KB
  163. Objects/stm32f10x_sdio.d 1.66KB
  164. Objects/stm32f10x_sdio.o 408.95KB
  165. Objects/stm32f10x_spi.crf 342.66KB
  166. Objects/stm32f10x_spi.d 1.63KB
  167. Objects/stm32f10x_spi.o 401.09KB
  168. Objects/stm32f10x_tim.crf 360.35KB
  169. Objects/stm32f10x_tim.d 1.63KB
  170. Objects/stm32f10x_tim.o 498.65KB
  171. Objects/stm32f10x_usart.crf 344.26KB
  172. Objects/stm32f10x_usart.d 1.7KB
  173. Objects/stm32f10x_usart.o 410.19KB
  174. Objects/stm32f10x_wwdg.crf 338.89KB
  175. Objects/stm32f10x_wwdg.d 1.66KB
  176. Objects/stm32f10x_wwdg.o 378.64KB
  177. Objects/system_stm32f10x.crf 339.93KB
  178. Objects/system_stm32f10x.d 1.66KB
  179. Objects/system_stm32f10x.o 374.16KB
  180. Project.uvguix.20726 172.4KB
  181. Project.uvguix.Admin 170.8KB
  182. Project.uvguix.刘田 90.69KB
  183. Project.uvoptx 33.64KB
  184. Project.uvprojx 26.57KB
  185. Start/
  186. Start/core_cm3.c 16.87KB
  187. Start/core_cm3.h 83.71KB
  188. Start/startup_stm32f10x_cl.s 15.4KB
  189. Start/startup_stm32f10x_hd.s 15.14KB
  190. Start/startup_stm32f10x_hd_vl.s 15.32KB
  191. Start/startup_stm32f10x_ld.s 12.09KB
  192. Start/startup_stm32f10x_ld_vl.s 13.34KB
  193. Start/startup_stm32f10x_md.s 12.47KB
  194. Start/startup_stm32f10x_md_vl.s 13.74KB
  195. Start/startup_stm32f10x_xl.s 15.58KB
  196. Start/stm32f10x.h 619.08KB
  197. Start/system_stm32f10x.c 35.7KB
  198. Start/system_stm32f10x.h 2.04KB
  199. System/
  200. System/Delay.c 838B
  201. System/Delay.h 135B
  202. User/
  203. User/main.c 1.34KB
  204. User/stm32f10x_conf.h 3.18KB
  205. User/stm32f10x_it.c 4.3KB
  206. User/stm32f10x_it.h 2.04KB
0评论
提交 加载更多评论
其他资源 Supermarket.zip
Supermarket.zip
404_mBot2.zip
404_mBot2.zip
基于SpringBoot的物品租赁系统(源码+数据库+报告)
物品租赁系统,系统包含两种角色:管理员、用户,系统分为前台和后台两大模块,主要功能如下。 前台: 1. 首页:展示系统的基础信息和操作入口。 2. 公告信息:展示系统的公告信息,包括公告标题、发布时间等。 3. 物品信息:展示系统的物品信息,包括物品名称、价格、押金等。 4. 物品出租:用户可以选择物品进行租赁,包括选择物品数量、租赁时间等。 5. 闲置资讯:展示系统的闲置物品信息,包括闲置物品名称、价格等。 后台: 管理员: 1. 个人中心:管理员可以管理个人信息,包括修改密码等操作。 2. 用户管理:管理员可以管理用户信息,包括添加、编辑、删除等操作。 3. 公告类型管理:管理员可以管理公告类型,包括添加、编辑、删除等操作。 4. 公告信息管理:管理员可以管理公告信息,包括添加、编辑、删除等操作。 5. 物品类别管理:管理员可以管理物品类别,包括添加、编辑、删除等操作。 6. 物品信息管理:管理员可以管理物品信息,包括添加、编辑、删除等操作。 7. 物品租赁管理:管理员可以管理物品租赁信息,包括查看租赁记录、审核租赁申请等操作。 8. 物品归还管理:管理员可以管理物品归还信息,
USB-SERIAL CH340 2019
串口驱动2019版
源代码-方卡在线帮助系统 v1.0.zip
源代码-方卡在线帮助系统 v1.0.zip
源代码-发文登记(查询)系统.zip
源代码-发文登记(查询)系统.zip
源代码-发发信息网源码.zip
源代码-发发信息网源码.zip
源代码-二月小说程序 v1.012 for sql.zip
源代码-二月小说程序 v1.012 for sql.zip