摘要: volatile uint32_t glo_50ms=0; void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { if(htim->Instance == TIM7) { glo_50ms++; } } uint64_t micr 阅读全文
posted @ 2020-06-11 15:15 超强磁铁 阅读(4778) 评论(1) 推荐(0) 编辑
摘要: 定义相关变量 /* USER CODE BEGIN PV */ /* Private variables */ #include "stdio.h" FATFS fs; // Work area (file system object) for logical drive FIL fil; // f 阅读全文
posted @ 2020-06-11 13:20 超强磁铁 阅读(1722) 评论(0) 推荐(0) 编辑
摘要: 在usart.c文件底部添加一下代码 #include "stdio.h" int fputc(int ch,FILE *f) { HAL_UART_Transmit(&huart1,(uint8_t*)&ch,1,10); return(ch); } 其中&huart1是你所使用的串口指针,添加代 阅读全文
posted @ 2020-06-11 12:38 超强磁铁 阅读(1709) 评论(0) 推荐(0) 编辑