Page 49 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 49
void USART1_Configuration()
{
USART_InitTypeDef USART_InitStructure;
USART_InitStructure.USART_BaudRate = 115200;
USART_InitStructure.USART_WordLength =
USART_WordLength_8b;
USART_InitStructure.USART_StopBits =
USART_StopBits_1;
USART_InitStructure.USART_Parity =
USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl
=
USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode =
USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART1, &USART_InitStructure);
USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
USART_Cmd(USART1, ENABLE);
}
void USART_Configuration()
{
USART1_Configuration();
}
- 42 -