feat: usart retarget

This commit is contained in:
2025-03-20 02:35:29 +08:00
parent f515d5fa96
commit 05dc5e3f53
5 changed files with 180 additions and 33 deletions

View File

@ -27,6 +27,7 @@
/* USER CODE BEGIN Includes */
#include <stdio.h>
#include "retarget.h"
#include "oled.h"
#include "rc522.h"
/* USER CODE END Includes */
@ -119,13 +120,19 @@ int main(void)
MX_USART1_UART_Init();
MX_SPI1_Init();
/* USER CODE BEGIN 2 */
// Retarget uart
RetargetInit(&huart1);
// Init RC522
MFRC_Init();
PCD_Reset();
// Init OLED
OLED_Init();
OLED_Clear();
OLED_ShowString(0,0,"Card scan...",12);
printf("startup\n");
/* USER CODE END 2 */
/* Infinite loop */