printf函数重定向【stm32】— > fputc()
#include "stm32f10x.h" #include "stdio.h" static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef NVIC_InitStructure;
设置频率播放一小段音频(用到PWM和蜂鸣器)
#include "stm32f10x.h" #include "sys.h" static GPIO_InitTypeDef GPIO_InitStructure; static TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure
【STM32】STM32端口复用和重映射的区别
stm32串口1接收和发送数据的使用
#include "stm32f10x.h" #include "stdio.h" static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef NVIC_InitStructure;
stm32运用PWM写呼吸灯的例子
代码不太完整,因为我的stm32板子的灯的引脚没有定时器所以就写个差不多的模板供以后参考
#include "stm32f10x.h" #include "sys.h" static GPIO_InitTypeDef GPIO_InitStructure; static TIM
定时中断
#include "stm32f10x.h" static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef NVIC_InitStructure; static TIM_TimeBaseInitTypeD
SysTick 滴答定时器
#include "stm32f10x.h" static GPIO_InitTypeDef GPIO_InitStructure; #define PB5OUT(n) *(volatile uint32_t *)(0x42000000+((uint32_t
滴答硬件定时器
#include "stm32f10x.h" static GPIO_InitTypeDef GPIO_InitStructure; #define PB5OUT(n) *(volatile uint32_t *)(0x42000000+((uint32_t
stm32设置优先级分组抢占
#include "stm32f10x.h" static EXTI_InitTypeDef EXTI_InitStructure; static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef
stm32优先级和响应优先级
@arg NVIC_PriorityGroup_0: 0 bits for pre-emption priority //不支持抢占优先级 * &n
stm32f103开发板写的中断按键控制(涉及中断触发和位带操作)
#include "stm32f10x.h" static EXTI_InitTypeDef EXTI_InitStructure; static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef