1.main.c(主函数部分)代码:
#include "stm32f10x.h" // Device header
#include "Delay.h"
#include "OLED.h"
#include "Timer.h"
uint16_t Num;
int main(void)
{
OLED_Init();
OLED_ShowString(1,1,"Num:");
OLED_ShowString(2,1,"CNT:");
Timer_Init();
while(1)
{
OLED_ShowNum(1,5,Num,4);
OLED_ShowNum(2,5,Timer_GetCounter(),4);
}
}
void TIM2_IRQHandler(void)
{