瀏覽代碼

Uart TImer Cnt 50ms 로 변경

PYJ 5 年之前
父節點
當前提交
beaaf6c5ab
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 1 1
      Bluecell_Src/uart.c
  2. 5 0
      Src/main.c

+ 1 - 1
Bluecell_Src/uart.c

@@ -122,7 +122,7 @@ void GetDataFromUartQueue(UART_HandleTypeDef *huart)
122 122
 
123 123
 }
124 124
 void Uart_Check(void){
125
-  while (TerminalQueue.data > 0 && UartRxTimerCnt > 10) GetDataFromUartQueue(&hTerminal);
125
+  while (TerminalQueue.data > 0 && UartRxTimerCnt > 50) GetDataFromUartQueue(&hTerminal);
126 126
 }
127 127
 
128 128
 void Uart1_Data_Send(uint8_t* data,uint16_t size){

+ 5 - 0
Src/main.c

@@ -147,7 +147,12 @@ void Pol_Delay_us(volatile uint32_t microseconds)
147 147
 
148 148
 int _write (int file, uint8_t *ptr, uint16_t len)
149 149
 {
150
+#if 0 // PYJ.2020.06.03_BEGIN -- 
150 151
     HAL_UART_Transmit(&hTest, ptr, len,10);
152
+#else
153
+    HAL_UART_Transmit(&hTerminal, ptr, len,10);    
154
+#endif // PYJ.2020.06.03_END -- 
155
+
151 156
     return len;
152 157
 }
153 158
 uint16_t adc1cnt = 0 ;