|
|
@@ -40,9 +40,11 @@
|
|
|
// ================================================================================
|
|
|
|
|
|
static u8 shark_uart0_tx_cache[SHARK_UART_TX_MEM_SIZE];
|
|
|
+#if UART_NUM==2
|
|
|
static u8 shark_uart1_tx_cache[SHARK_UART_TX_MEM_SIZE];
|
|
|
+#endif
|
|
|
static u8 shark_uart_rx_cache[SHARK_UART_RX_MEM_SIZE];
|
|
|
-static shark_uart_t _shark_uart[2];
|
|
|
+static shark_uart_t _shark_uart[UART_NUM];
|
|
|
static shark_task_t _uart_task;
|
|
|
static u64 _rx_time;
|
|
|
///static bool uart_no_data = false;
|
|
|
@@ -328,7 +330,11 @@ void DMA_Channel3_4_IRQHandler(void){
|
|
|
#endif
|
|
|
|
|
|
static u8 *tx_cache_addr(uart_enum_t uart_no){
|
|
|
+#if UART_NUM==2
|
|
|
return (uart_no == SHARK_UART0)?shark_uart0_tx_cache:shark_uart1_tx_cache;
|
|
|
+#else
|
|
|
+ return shark_uart0_tx_cache;
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
void shark_uart_deinit(uart_enum_t uart_no){
|