• 逐梦SHENG
    了解作者
  • C/C++
    开发工具
  • 2.7MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 3
    下载次数
  • 2019-05-23 18:04
    上传日期
stm32c8t6 oled代码,以及验证过,自己用的
oled.rar
  • oled
  • HARDWARE
  • mpu6050
  • mpu6050.h
    14.7KB
  • bsp_i2c.h
    411B
  • mpu6050.c
    3.1KB
  • bsp_i2c.c
    8KB
  • PWM
  • PWM.h
    92B
  • PWM.c
    8.4KB
  • led
  • led.h
    97B
  • led.c
    716B
  • AD
  • sysitck.c
    611B
  • ADC.c
    3.7KB
  • sysitck.h
    158B
  • ADC.h
    324B
  • usart
  • printf.h
    147B
  • printf.c
    2KB
  • encode
  • encode.c
    1.6KB
  • encode.h
    146B
  • OLED
  • oled.h
    1.7KB
  • bmp.h
    5.5KB
  • oled.c
    8.7KB
  • oledfont.h
    14.9KB
  • nrf
  • nrf24l01.h
    4.2KB
  • spi.c
    2.1KB
  • nrf24l01.c
    7.2KB
  • spi.h
    240B
  • USER
  • RTE
  • RTE_Components.h
    252B
  • stm32f10x.h
    619.1KB
  • OLED.uvguix.1
    136.6KB
  • stm32f10x_conf.h
    3.2KB
  • OLED.uvproj.saved_uv4
    17.8KB
  • system_stm32f10x.h
    2KB
  • startup_stm32f10x_hd.lst
    50KB
  • stm32f10x_it.c
    2.4KB
  • OLED.map
    91.7KB
  • OLED.uvoptx
    20.5KB
  • OLED.uvgui.Administrator
    73.9KB
  • OLED.uvopt
    14.6KB
  • OLED.uvprojx
    20.7KB
  • stm32f10x_it.h
    1.9KB
  • main.c
    2.7KB
  • JLinkSettings.ini
    650B
  • OLED.uvgui.1
    69KB
  • OLED.uvgui.evk
    73KB
  • system_stm32f10x.c
    35.7KB
  • SYSTEM
  • usart
  • usart.h
    1.3KB
  • usart.c
    5KB
  • sys
  • sys.c
    616B
  • sys.h
    2.6KB
  • delay
  • delay.h
    1.5KB
  • delay.c
    4.5KB
  • OBJ
  • stm32f10x_spi.o
    272.8KB
  • usart.o
    263.6KB
  • spi.d
    716B
  • nrf24l01.crf
    252.5KB
  • misc.crf
    240.3KB
  • encode.crf
    263KB
  • sysitck.d
    645B
  • stm32f10x_rcc.d
    751B
  • stm32f10x_it.o
    258.2KB
  • led.o
    257.2KB
  • ExtDll.iex
    19B
  • core_cm3.o
    11.2KB
  • stm32f10x_tim.crf
    283.6KB
  • sys.o
    258.1KB
  • usart.crf
    245.8KB
  • sys.crf
    240.4KB
  • mpu6050.crf
    265.4KB
  • main.crf
    251.8KB
  • oled.crf
    251KB
  • pwm.crf
    262.9KB
  • stm32f10x_it.d
    666B
  • led.crf
    239.7KB
  • delay.o
    260.3KB
  • system_stm32f10x.crf
    241.4KB
  • encode.d
    775B
  • printf.d
    698B
  • adc.d
    713B
  • main.o
    269.8KB
  • OLED.sct
    479B
  • stm32f10x_adc.d
    751B
  • stm32f10x_rcc.crf
    247.3KB
  • sysitck.crf
    239.4KB
  • stm32f10x_adc.crf
    256.2KB
  • stm32f10x_usart.o
    268.1KB
内容介绍
/** ****************************************************************************** * @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. * * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2> ****************************************************************************** */ /* 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
评论
    相关推荐
    • STM32OLED模拟iIC.zip
      STM32F103单片机两线oled驱动程序带字符字库
    • stm32 oled显示 全打包
      stm32 oled显示 亲测有效。如果不知道去哪里找代码,就来这里,绝对不会让你失望,此代码适用于stm32
    • STM32 OLED 菜单显示汉字
      STM32 OLED 菜单显示,可以显示汉字菜单,反白显示。
    • STM32 OLED驱动 SPI协议
      STM32OLED驱动(4线SPI) 另加电源、地,6线的OLED
    • stm32OLED显示
      Stm32_Clock_Init(360,25,2,8); //设置时钟,180Mhz delay_init(180); //初始化延时函数 LED_Init(); //初始化LED OLED_Init(); //初始化OLED OLED_ShowString(0,0,"ALIENTEK",24); OLED_ShowString(0,24, ...
    • STM32 OLED 菜单显示汉字
      STM32 OLED 菜单显示汉字
    • stm32oled.zip
      proteus仿真
    • STM32_OLED显示
      适合stm32OLED显示,分非常好用的程序,本人亲测。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。...
    • STM32OLED显示
      STM32OLED显示-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------...
    • IIC 接口STM32 OLED 万年历
      此万年历可以显示农历 公历,星期,时间. 算法简单独特,让人脑洞大开 后面加上语音报时功能 无需音频模块,开发板无电池 时间不会掉 此代码有音乐播放功能 整点播放功能自行增加;...联线方法见README.TXT