好的,以下是使用标准库编写 stm32f103c8t6 通过 USART2 串口输出数值的程序:
#include "stm32f10x.h"
#include "stdio.h"
int main(void) {
// 初始化时钟和串口
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_AFIO, ENABLE);
USART_InitTypeDef USART_In