#include"stm32f10x_map.h"
int main()
{
RCC->APB2ENR|=1<<14;
RCC->APB2ENR|=1<<2;
RCC->APB2ENR|=1<<5;
GPIOA->CRH&=0xfffff00f;
GPIOA->CRH|=0x000004b0;
USART1->BRR=0x0045;
USART1->CR1|=1<<2;
USART1->CR1|=1<<3;
USART1->CR1|=1<<13;
if(USART1->SR&1<<5)
return USART1->DR;
}
|