备份 -- 111
This commit is contained in:
parent
10a615ff74
commit
82a75d275a
|
@ -218,8 +218,8 @@ void start_ch438_task(void const *argument)
|
||||||
// osThreadTerminate(NULL);
|
// osThreadTerminate(NULL);
|
||||||
ch438_interrupt_handler_ch438_chip_1();
|
ch438_interrupt_handler_ch438_chip_1();
|
||||||
ch438_interrupt_handler_ch438_chip_2();
|
ch438_interrupt_handler_ch438_chip_2();
|
||||||
ch438_interrupt_handler_data_ch438_chip_1();
|
// ch438_interrupt_handler_data_ch438_chip_1();
|
||||||
ch438_interrupt_handler_data_ch438_chip_2();
|
// ch438_interrupt_handler_data_ch438_chip_2();
|
||||||
vTaskDelay(10);
|
vTaskDelay(10);
|
||||||
}
|
}
|
||||||
/* USER CODE END start_ch438_task */
|
/* USER CODE END start_ch438_task */
|
||||||
|
|
|
@ -287,7 +287,7 @@
|
||||||
<periodic>1</periodic>
|
<periodic>1</periodic>
|
||||||
<aLwin>1</aLwin>
|
<aLwin>1</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>1</aSer1>
|
<aSer1>0</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
<aPa>0</aPa>
|
<aPa>0</aPa>
|
||||||
<viewmode>1</viewmode>
|
<viewmode>1</viewmode>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -342,23 +342,24 @@ void ch438_interrupt_handler_ch438_chip_1(void)
|
||||||
HAL_Delay(10);
|
HAL_Delay(10);
|
||||||
hart_ht1200m_rts_io_receive(i);
|
hart_ht1200m_rts_io_receive(i);
|
||||||
break;
|
break;
|
||||||
// case INT_RCV_OVERTIME: /* 接收超时中断 */
|
case INT_RCV_OVERTIME: /* 接收超时中断 */
|
||||||
// ch438_uart_data[i].receive_data_length = ch438_recv_data(i, ch438_uart_data[i].receive_data_buff);
|
memset(hart_uart[i].rx_data, 0x00, sizeof(hart_uart[i].rx_data));
|
||||||
// // ch438_send_data(i, ch438_uart_data[i].receive_data_buff, ch438_uart_data[i].receive_data_length);
|
hart_uart[i].rx_length = ch438_recv_data(i, hart_uart[i].rx_data);
|
||||||
// if (tcp_echo_flags[i] == 1)
|
if (tcp_echo_flags[i] == 1)
|
||||||
// {
|
{
|
||||||
// user_send_data_hart(i, ch438_uart_data[i].receive_data_buff, ch438_uart_data[i].receive_data_length);
|
user_send_data_hart(i, hart_uart[i].rx_data, hart_uart[i].rx_length);
|
||||||
// uart_times[i]++;
|
hart_uart[i].rx_times++;
|
||||||
// }
|
}
|
||||||
// break;
|
break;
|
||||||
// case INT_RCV_SUCCESS: /* 接收数据可用中断 */
|
case INT_RCV_SUCCESS: /* 接收数据可用中断 */
|
||||||
// ch438_uart_data[i].receive_data_length = ch438_recv_data(i, ch438_uart_data[i].receive_data_buff);
|
memset(hart_uart[i].rx_data, 0x00, sizeof(hart_uart[i].rx_data));
|
||||||
// if (tcp_echo_flags[i] == 1)
|
hart_uart[i].rx_length = ch438_recv_data(i, hart_uart[i].rx_data);
|
||||||
// {
|
if (tcp_echo_flags[i] == 1)
|
||||||
// user_send_data_hart(i, ch438_uart_data[i].receive_data_buff, ch438_uart_data[i].receive_data_length);
|
{
|
||||||
// uart_times[i]++;
|
user_send_data_hart(i, hart_uart[i].rx_data, hart_uart[i].rx_length);
|
||||||
// }
|
hart_uart[i].rx_times++;
|
||||||
// break;
|
}
|
||||||
|
break;
|
||||||
case INT_RCV_LINES: /* 接收线路状态中断 */
|
case INT_RCV_LINES: /* 接收线路状态中断 */
|
||||||
ch438_read_reg(ch438_num, offsetadd[i] | REG_LSR_ADDR, 1);
|
ch438_read_reg(ch438_num, offsetadd[i] | REG_LSR_ADDR, 1);
|
||||||
break;
|
break;
|
||||||
|
@ -399,22 +400,24 @@ void ch438_interrupt_handler_ch438_chip_2(void)
|
||||||
HAL_Delay(10);
|
HAL_Delay(10);
|
||||||
hart_ht1200m_rts_io_receive(i);
|
hart_ht1200m_rts_io_receive(i);
|
||||||
break;
|
break;
|
||||||
// case INT_RCV_OVERTIME: /* 接收超时中断 */
|
case INT_RCV_OVERTIME: /* 接收超时中断 */
|
||||||
// ch438_uart_data[i].receive_data_length = ch438_recv_data(i, ch438_uart_data[i].receive_data_buff);
|
memset(hart_uart[i].rx_data, 0x00, sizeof(hart_uart[i].rx_data));
|
||||||
// if (tcp_echo_flags[i] == 1)
|
hart_uart[i].rx_length = ch438_recv_data(i, hart_uart[i].rx_data);
|
||||||
// {
|
if (tcp_echo_flags[i] == 1)
|
||||||
// user_send_data_hart(i, ch438_uart_data[i].receive_data_buff, ch438_uart_data[i].receive_data_length);
|
{
|
||||||
// uart_times[i]++;
|
user_send_data_hart(i, hart_uart[i].rx_data, hart_uart[i].rx_length);
|
||||||
// }
|
hart_uart[i].rx_times++;
|
||||||
// break;
|
}
|
||||||
// case INT_RCV_SUCCESS: /* 接收数据可用中断 */
|
break;
|
||||||
// ch438_uart_data[i].receive_data_length = ch438_recv_data(i, ch438_uart_data[i].receive_data_buff);
|
case INT_RCV_SUCCESS: /* 接收数据可用中断 */
|
||||||
// if (tcp_echo_flags[i] == 1)
|
memset(hart_uart[i].rx_data, 0x00, sizeof(hart_uart[i].rx_data));
|
||||||
// {
|
hart_uart[i].rx_length = ch438_recv_data(i, hart_uart[i].rx_data);
|
||||||
// user_send_data_hart(i, ch438_uart_data[i].receive_data_buff, ch438_uart_data[i].receive_data_length);
|
if (tcp_echo_flags[i] == 1)
|
||||||
// uart_times[i]++;
|
{
|
||||||
// }
|
user_send_data_hart(i, hart_uart[i].rx_data, hart_uart[i].rx_length);
|
||||||
// break;
|
hart_uart[i].rx_times++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case INT_RCV_LINES: /* 接收线路状态中断 */
|
case INT_RCV_LINES: /* 接收线路状态中断 */
|
||||||
ch438_read_reg(ch438_num, offsetadd[i - 8] | REG_LSR_ADDR, 1);
|
ch438_read_reg(ch438_num, offsetadd[i - 8] | REG_LSR_ADDR, 1);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue