修改cmakelist中项目文件名的修改方式。
添加默认的usart的接收中断和超时中断。
This commit is contained in:
@@ -120,4 +120,13 @@ void TIMER16_IRQHandler(void)
|
||||
}
|
||||
led_status = !led_status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles USART0 interrupt request
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void USART0_IRQHandler(void) {
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
setbuf(stdout, NULL);
|
||||
/* configure systick */
|
||||
systick_config();
|
||||
/* configure USART */
|
||||
|
@@ -28,6 +28,10 @@ void usart_config(void)
|
||||
usart_transmit_config(USART_PHY, USART_TRANSMIT_ENABLE);
|
||||
|
||||
usart_enable(USART_PHY);
|
||||
|
||||
nvic_irq_enable(USART0_IRQn, 0);
|
||||
usart_interrupt_enable(USART_PHY, USART_INT_RBNE);
|
||||
usart_interrupt_enable(USART_PHY, USART_INT_IDLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user