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

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

APM32E103系列单片机工程的创建(仿江科大工程)

硬件开发 219.31KB 18 需要积分: 1
立即下载

资源介绍:

创建的apm32工程文件
/*! * @file apm32e10x_tmr.c * * @brief This file provides all the TMR firmware functions. * * @version V1.0.2 * * @date 2022-12-31 * * @attention * * Copyright (C) 2021-2023 Geehy Semiconductor * * You may not use this file except in compliance with the * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE). * * The program is only for reference, which is distributed in the hope * that it will be useful and instructional for customers to develop * their software. Unless required by applicable law or agreed to in * writing, the program is distributed on an "AS IS" BASIS, WITHOUT * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied. * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions * and limitations under the License. */ #include "apm32e10x_tmr.h" #include "apm32e10x_rcm.h" /** @addtogroup APM32E10x_StdPeriphDriver @{ */ /** @addtogroup TMR_Driver * @brief TMR driver modules @{ */ /** @defgroup TMR_Functions Functions @{ */ static void TI1Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); static void TI2Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); static void TI3Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); static void TI4Config(TMR_T* tmr, uint16_t ICpolarity, uint16_t ICselection, uint16_t ICfilter); /*! * @brief Deinitializes the TMRx peripheral registers to their default reset values. * * @param tmr: Select TMRx peripheral, The x can be 1 to 8 * * @retval None * * @note */ void TMR_Reset(TMR_T* tmr) { if (tmr == TMR1) { RCM_EnableAPB2PeriphReset(RCM_APB2_PERIPH_TMR1); RCM_DisableAPB2PeriphReset(RCM_APB2_PERIPH_TMR1); } else if (tmr == TMR2) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR2); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR2); } else if (tmr == TMR3) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR3); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR3); } else if (tmr == TMR4) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR4); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR4); } else if (tmr == TMR5) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR5); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR5); } else if (tmr == TMR6) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR6); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR6); } else if (tmr == TMR7) { RCM_EnableAPB1PeriphReset(RCM_APB1_PERIPH_TMR7); RCM_DisableAPB1PeriphReset(RCM_APB1_PERIPH_TMR7); } else if (tmr == TMR8) { RCM_EnableAPB2PeriphReset(RCM_APB2_PERIPH_TMR8); RCM_DisableAPB2PeriphReset(RCM_APB2_PERIPH_TMR8); } } /*! * @brief Initializes the base timer through the structure * * @param tmr: Select TMRx peripheral, The x can be 1 to 8 * * @param baseConfig: Pointer to a TMR_BaseConfig_T structure * * @retval None */ void TMR_ConfigTimeBase(TMR_T* tmr, TMR_BaseConfig_T* baseConfig) { uint16_t temp; if ((tmr == TMR1) || (tmr == TMR8) || (tmr == TMR2) || (tmr == TMR3) || (tmr == TMR4) || (tmr == TMR5)) { temp = tmr->CTRL1; temp &= 0x038F; temp |= baseConfig->countMode; tmr->CTRL1 = temp; } if ((tmr != TMR6) && (tmr != TMR7)) { tmr->CTRL1_B.CLKDIV = baseConfig->clockDivision; } tmr->AUTORLD = baseConfig->period; tmr->PSC = baseConfig->division; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->REPCNT = baseConfig->repetitionCounter; } tmr->CEG_B.UEG = 0x01; } /*! * @brief Configure channel 1 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC1Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC1(TMR_T* tmr, TMR_OCConfig_T* OC1Config) { tmr->CCEN_B.CC1EN = BIT_RESET; tmr->CCM1_COMPARE_B.CC1SEL = BIT_RESET; tmr->CCM1_COMPARE_B.OC1MOD = OC1Config->mode; tmr->CCEN_B.CC1POL = OC1Config->polarity; tmr->CCEN_B.CC1EN = OC1Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CCEN_B.CC1NPOL = OC1Config->nPolarity; tmr->CCEN_B.CC1NEN = OC1Config->outputNState; tmr->CTRL2_B.OC1OIS = BIT_RESET; tmr->CTRL2_B.OC1NOIS = BIT_RESET; tmr->CTRL2_B.OC1OIS = OC1Config->idleState; tmr->CTRL2_B.OC1NOIS = OC1Config->nIdleState; } tmr->CC1 = OC1Config->pulse; } /*! * @brief Configure channel 2 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC2Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC2(TMR_T* tmr, TMR_OCConfig_T* OC2Config) { tmr->CCEN_B.CC2EN = BIT_RESET; tmr->CCM1_COMPARE_B.OC2MOD = BIT_RESET; tmr->CCM1_COMPARE_B.CC2SEL = BIT_RESET; tmr->CCM1_COMPARE_B.OC2MOD = OC2Config->mode; tmr->CCEN_B.CC2POL = BIT_RESET; tmr->CCEN_B.CC2POL = OC2Config->polarity; tmr->CCEN_B.CC2EN = OC2Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CCEN_B.CC2NPOL = BIT_RESET; tmr->CCEN_B.CC2NPOL = OC2Config->nPolarity; tmr->CCEN_B.CC2NEN = BIT_RESET; tmr->CCEN_B.CC2NEN = OC2Config->outputNState; tmr->CTRL2_B.OC2OIS = BIT_RESET; tmr->CTRL2_B.OC2NOIS = BIT_RESET; tmr->CTRL2_B.OC2OIS = OC2Config->idleState; tmr->CTRL2_B.OC2NOIS = OC2Config->nIdleState; } tmr->CC2 = OC2Config->pulse; } /*! * @brief Configure channel 3 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC3Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC3(TMR_T* tmr, TMR_OCConfig_T* OC3Config) { tmr->CCEN_B.CC3EN = BIT_RESET; tmr->CCM2_COMPARE_B.OC3MOD = BIT_RESET; tmr->CCM2_COMPARE_B.CC3SEL = BIT_RESET; tmr->CCM2_COMPARE_B.OC3MOD = OC3Config->mode; tmr->CCEN_B.CC3POL = BIT_RESET; tmr->CCEN_B.CC3POL = OC3Config->polarity; tmr->CCEN_B.CC3EN = OC3Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CCEN_B.CC3NPOL = BIT_RESET; tmr->CCEN_B.CC3NPOL = OC3Config->nPolarity; tmr->CCEN_B.CC3NEN = BIT_RESET; tmr->CCEN_B.CC3NEN = OC3Config->outputNState; tmr->CTRL2_B.OC3OIS = BIT_RESET; tmr->CTRL2_B.OC3NOIS = BIT_RESET; tmr->CTRL2_B.OC3OIS = OC3Config->idleState; tmr->CTRL2_B.OC3NOIS = OC3Config->nIdleState; } tmr->CC3 = OC3Config->pulse; } /*! * @brief Configure channel 4 according to parameters * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param OC4Config: Pointer to a TMR_OCConfig_T structure * * @retval None */ void TMR_ConfigOC4(TMR_T* tmr, TMR_OCConfig_T* OC4Config) { tmr->CCEN_B.CC4EN = BIT_RESET; tmr->CCM2_COMPARE_B.OC4MOD = BIT_RESET; tmr->CCM2_COMPARE_B.CC4SEL = BIT_RESET; tmr->CCM2_COMPARE_B.OC4MOD = OC4Config->mode; tmr->CCEN_B.CC4POL = BIT_RESET; tmr->CCEN_B.CC4POL = OC4Config->polarity; tmr->CCEN_B.CC4EN = OC4Config->outputState; if ((tmr == TMR1) || (tmr == TMR8)) { tmr->CTRL2_B.OC4OIS = BIT_RESET; tmr->CTRL2_B.OC4OIS = OC4Config->idleState; } tmr->CC4 = OC4Config->pulse; } /*! * @brief Configure Peripheral equipment * * @param tmr: The TMRx can be 1 to 8 except 6 and 7 * * @param ICConfig: Pointer to a TMR_ICConfig_T structure * * @retval None */ void TMR_ConfigIC(TMR

资源文件列表:

2-1 APM32 工程模板.zip 大约有73个文件
  1. 2-1 APM32 工程模板/DebugConfig/
  2. 2-1 APM32 工程模板/keilkill.bat 399B
  3. 2-1 APM32 工程模板/library/
  4. 2-1 APM32 工程模板/library/apm32e10x_adc.c 33.18KB
  5. 2-1 APM32 工程模板/library/apm32e10x_adc.h 12.29KB
  6. 2-1 APM32 工程模板/library/apm32e10x_bakpr.c 6.07KB
  7. 2-1 APM32 工程模板/library/apm32e10x_bakpr.h 4.29KB
  8. 2-1 APM32 工程模板/library/apm32e10x_can.c 31.01KB
  9. 2-1 APM32 工程模板/library/apm32e10x_can.h 13.18KB
  10. 2-1 APM32 工程模板/library/apm32e10x_crc.c 2.72KB
  11. 2-1 APM32 工程模板/library/apm32e10x_crc.h 1.65KB
  12. 2-1 APM32 工程模板/library/apm32e10x_dac.c 12.16KB
  13. 2-1 APM32 工程模板/library/apm32e10x_dac.h 6.41KB
  14. 2-1 APM32 工程模板/library/apm32e10x_dbgmcu.c 7.35KB
  15. 2-1 APM32 工程模板/library/apm32e10x_dbgmcu.h 3.22KB
  16. 2-1 APM32 工程模板/library/apm32e10x_dma.c 25.48KB
  17. 2-1 APM32 工程模板/library/apm32e10x_dma.h 7.99KB
  18. 2-1 APM32 工程模板/library/apm32e10x_dmc.c 12.02KB
  19. 2-1 APM32 工程模板/library/apm32e10x_dmc.h 8.53KB
  20. 2-1 APM32 工程模板/library/apm32e10x_eint.c 4.88KB
  21. 2-1 APM32 工程模板/library/apm32e10x_eint.h 3.91KB
  22. 2-1 APM32 工程模板/library/apm32e10x_fmc.c 19.16KB
  23. 2-1 APM32 工程模板/library/apm32e10x_fmc.h 11.16KB
  24. 2-1 APM32 工程模板/library/apm32e10x_gpio.c 16.83KB
  25. 2-1 APM32 工程模板/library/apm32e10x_gpio.h 7.16KB
  26. 2-1 APM32 工程模板/library/apm32e10x_i2c.c 27.66KB
  27. 2-1 APM32 工程模板/library/apm32e10x_i2c.h 9.57KB
  28. 2-1 APM32 工程模板/library/apm32e10x_iwdt.c 3.57KB
  29. 2-1 APM32 工程模板/library/apm32e10x_iwdt.h 2.54KB
  30. 2-1 APM32 工程模板/library/apm32e10x_misc.c 6.3KB
  31. 2-1 APM32 工程模板/library/apm32e10x_misc.h 3.1KB
  32. 2-1 APM32 工程模板/library/apm32e10x_pmu.c 6.82KB
  33. 2-1 APM32 工程模板/library/apm32e10x_pmu.h 3.06KB
  34. 2-1 APM32 工程模板/library/apm32e10x_rcm.c 36.39KB
  35. 2-1 APM32 工程模板/library/apm32e10x_rcm.h 9.02KB
  36. 2-1 APM32 工程模板/library/apm32e10x_rtc.c 6.31KB
  37. 2-1 APM32 工程模板/library/apm32e10x_rtc.h 2.63KB
  38. 2-1 APM32 工程模板/library/apm32e10x_sci2c.c 25.77KB
  39. 2-1 APM32 工程模板/library/apm32e10x_sci2c.h 10.83KB
  40. 2-1 APM32 工程模板/library/apm32e10x_sdio.c 23.41KB
  41. 2-1 APM32 工程模板/library/apm32e10x_sdio.h 11.83KB
  42. 2-1 APM32 工程模板/library/apm32e10x_smc.c 35.48KB
  43. 2-1 APM32 工程模板/library/apm32e10x_smc.h 11.85KB
  44. 2-1 APM32 工程模板/library/apm32e10x_spi.c 16.73KB
  45. 2-1 APM32 工程模板/library/apm32e10x_spi.h 7.6KB
  46. 2-1 APM32 工程模板/library/apm32e10x_tmr.c 67.31KB
  47. 2-1 APM32 工程模板/library/apm32e10x_tmr.h 18.41KB
  48. 2-1 APM32 工程模板/library/apm32e10x_usart.c 23.01KB
  49. 2-1 APM32 工程模板/library/apm32e10x_usart.h 7.84KB
  50. 2-1 APM32 工程模板/library/apm32e10x_usb.c 7.78KB
  51. 2-1 APM32 工程模板/library/apm32e10x_usb.h 13.18KB
  52. 2-1 APM32 工程模板/library/apm32e10x_wwdt.c 3.65KB
  53. 2-1 APM32 工程模板/library/apm32e10x_wwdt.h 2.17KB
  54. 2-1 APM32 工程模板/Listings/
  55. 2-1 APM32 工程模板/Objects/
  56. 2-1 APM32 工程模板/project.uvprojx 24.39KB
  57. 2-1 APM32 工程模板/start/
  58. 2-1 APM32 工程模板/start/apm32e10x.h 179.3KB
  59. 2-1 APM32 工程模板/start/cmsis_armcc.h 27.43KB
  60. 2-1 APM32 工程模板/start/cmsis_armclang.h 44.82KB
  61. 2-1 APM32 工程模板/start/cmsis_armclang_ltm.h 53.93KB
  62. 2-1 APM32 工程模板/start/cmsis_compiler.h 9.26KB
  63. 2-1 APM32 工程模板/start/cmsis_gcc.h 61.89KB
  64. 2-1 APM32 工程模板/start/cmsis_iccarm.h 26.83KB
  65. 2-1 APM32 工程模板/start/cmsis_version.h 1.68KB
  66. 2-1 APM32 工程模板/start/core_cm3.h 106.76KB
  67. 2-1 APM32 工程模板/start/startup_apm32e10x_hd.s 14.99KB
  68. 2-1 APM32 工程模板/start/system_apm32e10x.c 15.64KB
  69. 2-1 APM32 工程模板/start/system_apm32e10x.h 1.4KB
  70. 2-1 APM32 工程模板/user/
  71. 2-1 APM32 工程模板/user/apm32e10x_int.c 2.56KB
  72. 2-1 APM32 工程模板/user/apm32e10x_int.h 1.56KB
  73. 2-1 APM32 工程模板/user/main.c 105B
0评论
提交 加载更多评论
其他资源 基于java控制台酒店管理系统开发框架:eclipse + jdk + java数据库:无
基于java控制台酒店管理系统 开发框架:eclipse + jdk + java 数据库:无 角色介绍 管理员 admins 123456 普通用户 qqq 123456 模块介绍 管理员 登录模块 客户模块 房间模块 退出功能 普通用户 登录模块 房价预览 房价预订 退房功能 退出功能 数据库介绍 数据库名称 无
基于javaswing在线考试系统开发框架:eclipse + java + jdk + mysql数据库:mysql
基于javaswing在线考试系统 开发框架:eclipse + java + jdk + mysql 数据库:mysql 角色介绍 教师用户 admins 123456 教师验证码 请输入您的身份验证密码 123456 普通用户 qqq 123456 模块介绍 教师 身份选择 登录注册 首页模块 查询成绩 修改成绩 添加试题 添加试卷 退出功能 普通用户 身份选择 登录注册 考试模块 退出功能 数据库介绍 数据库名称examsystem sc sno, score student teacher num, q
F407在RAM中调试
STM32F407在SRAM中调试
基于JQuery实现电梯导航特效+页面滚动一定高度后固定头部导航.zip
资源介绍:这段代码实现了两个功能:1,页面滚动一定高度后,头部导航一部分固定在页面顶端。2.垂直电梯导航。这两个效果再制作网站时经常被用到。 资源特点:代码短小、代码容易阅读、重点注释、方便扩展、样式美观、使用JQ框架。 适用人群:前端从业职,新手小白,有网站开发能力对美工有所欠缺的后端工程师。 提示:------------------------------------------------------------------------------------------------------------ 文件夹里包含预览图,源码有注释。没有任何广告和病毒,可放心下载,学习,使用。
EasyExcel工具包
最近,我创建了一个实用的EasyExcel工具类,旨在简化和优化Excel文件的读写操作。这个工具类通过封装常用功能,提供了简单易用的接口,能够帮助开发者更加高效地处理Excel数据。以下是该工具类的一些主要特点和功能介绍。 首先,该工具类设计简洁,使用便捷。用户只需通过简单的API调用即可完成Excel文件的读写操作,无需繁琐的配置。同时,工具类提供了详尽的文档和使用示例,即便是初学者也能快速上手,极大地降低了学习成本。 其次,工具类基于阿里巴巴的EasyExcel库进行封装,具备高性能和低内存消耗的优点,特别适用于处理大数据量的Excel文件。无论是读取百万级别的Excel数据,还是批量写入大量数据,这个工具类都能应对自如,显著提升了数据处理的效率。 该工具类还具备很强的灵活性和可扩展性。用户可以根据自身需求,自定义读取和写入策略。例如,用户可以自定义Excel文件的解析规则,或者根据业务需求,调整数据的写入格式和样式设置。此外,工具类支持多种数据格式和样式的设置,能够满足各种复杂业务场景的需求。 在错误处理方面,工具类内置了完善的机制,能够捕获和处理读写过程中可能出现问题
纯CSS实现的很酷的光圈沿着按钮轮廓旋绕的按钮.zip
资源介绍:这段代码通过css伪类::before 和 after 实现了一个光条环绕按钮边框旋转的效果,非常的酷炫。纯css实现的按钮动态效果,代码逻辑清晰。 资源特点:代码短小、代码容易阅读、重点注释、方便扩展、样式美观、不使用js,不使用JQ框架。 适用人群:前端从业职,新手小白,有网站开发能力对美工有所欠缺的后端工程师。 提示:------------------------------------------------------------------------------------------------------------ 文件夹里包含预览图,源码有注释。没有任何广告和病毒,可放心下载,学习,使用。
合宙air001硬件spi驱动7针oled屏幕
此为官方例程包
基于go微服务架构的直播平台服务.zip
基于go微服务架构的直播平台服务.zip