mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
add stm32g070
This commit is contained in:
parent
14bf07d742
commit
7267aacd48
@ -24,7 +24,7 @@
|
||||
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
#include "pikaScript.h"
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
@ -88,7 +88,7 @@ int main(void)
|
||||
MX_GPIO_Init();
|
||||
MX_USART1_UART_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
PikaObj *pikaMain = pikaScriptInit();
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "usart.h"
|
||||
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
#include <stdio.h>
|
||||
/* USER CODE END 0 */
|
||||
|
||||
UART_HandleTypeDef huart1;
|
||||
@ -125,7 +125,30 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
||||
/**
|
||||
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>c<EFBFBD>⺯<EFBFBD><EFBFBD>printf<EFBFBD><EFBFBD>DEBUG_USARTx
|
||||
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
||||
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> ֵ: <EFBFBD><EFBFBD>
|
||||
* ˵ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
int fputc(int ch, FILE *f)
|
||||
{
|
||||
HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, 0xffff);
|
||||
return ch;
|
||||
}
|
||||
|
||||
/**
|
||||
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>c<EFBFBD>⺯<EFBFBD><EFBFBD>getchar,scanf<EFBFBD><EFBFBD>DEBUG_USARTx
|
||||
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
||||
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> ֵ: <EFBFBD><EFBFBD>
|
||||
* ˵ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
int fgetc(FILE *f)
|
||||
{
|
||||
uint8_t ch = 0;
|
||||
HAL_UART_Receive(&huart1, &ch, 1, 0xffff);
|
||||
return ch;
|
||||
}
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
@ -313,7 +313,7 @@
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>2</Optim>
|
||||
<Optim>4</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
|
Loading…
x
Reference in New Issue
Block a user