添加flash

This commit is contained in:
2025-03-06 16:33:34 +08:00
parent 8648025432
commit 8603e73b45
94 changed files with 800 additions and 40308 deletions

View File

@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2024 STMicroelectronics.
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
@ -69,7 +69,6 @@ void MX_USART1_UART_Init(void)
}
/* USER CODE BEGIN USART1_Init 2 */
/* USER CODE END USART1_Init 2 */
}
@ -261,24 +260,5 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
}
/* USER CODE BEGIN 1 */
//int fputc(int ch, FILE *f)
//{
// USART1->TDR = ch;
// while((USART1->ISR & USART_ISR_TC) == 0)
// {}
// return ch;
//}
int _write (int fd, char *pBuffer, int size)
{
for (int i = 0; i < size; i++)
{
USART1->TDR = (unsigned char) *(pBuffer+i);
while((USART1->ISR & USART_ISR_TC) == 0)
{}
}
return size;
}
/* USER CODE END 1 */