mirror of
https://github.com/EFeru/hoverboard-sideboard-hack-GD.git
synced 2026-02-17 15:41:08 +00:00
Major UART communication improvement
- the UART communication is improved based on UART Idle line detection interrupt - both Tx and Rx are efficiently handled using DMA Other: - minor visual improvements
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "systick.h"
|
||||
#include "i2c_it.h"
|
||||
#include "config.h"
|
||||
#include "util.h"
|
||||
|
||||
/*!
|
||||
\brief this function handles NMI exception
|
||||
@@ -121,6 +122,20 @@ void SysTick_Handler(void)
|
||||
delay_decrement();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles the USART1 interrupt request
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void USART1_IRQHandler(void)
|
||||
{
|
||||
if(RESET != usart_interrupt_flag_get(USART1, USART_INT_FLAG_IDLE)) { // Check for IDLE line interrupt
|
||||
usart_flag_clear(USART1, USART_FLAG_IDLE); // Clear IDLE line flag (otherwise it will continue to enter interrupt)
|
||||
usart_rx_check(); // Check for data to process
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles I2C0 event interrupt request exception
|
||||
\param[in] none
|
||||
|
||||
Reference in New Issue
Block a user