修改cmakelist中项目文件名的修改方式。

添加默认的usart的接收中断和超时中断。
This commit is contained in:
2024-12-31 21:53:07 +08:00
parent b6d37fcc13
commit 1a8f1fa203
5 changed files with 22 additions and 7 deletions

View File

@@ -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) {
}

View File

@@ -14,6 +14,7 @@
*/
int main(void)
{
setbuf(stdout, NULL);
/* configure systick */
systick_config();
/* configure USART */

View File

@@ -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);
}
/**