📄 common.c
字号:
#include<stdio.h>
//-----------------------------------------------------------------------------
#include"stm32f10x_usart.h"
//-----------------------------------------------------------------------------
#pragma import(__use_no_semihosting_swi)
//-----------------------------------------------------------------------------
struct __FILE
{
int handle; /* Add whatever you need here */
};
//-----------------------------------------------------------------------------
FILE __stdout;
FILE __stdin;
FILE __stderr;
//-----------------------------------------------------------------------------
int fputc(int ch,
FILE* f)
{
{
USART1_SendData((unsigned char)ch);
while(USART1_SR_BITS[TX_E]==0);
}
return(ch);
}
//-----------------------------------------------------------------------------
void _sys_exit(int return_code)
{
label:
goto label; // endless loop
}
//-----------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -