|
|
|
@ -227,15 +227,21 @@ void HAL_FDCAN_RxFifo0Callback(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo0ITs) |
|
|
|
void Read_MK32(void *argument) |
|
|
|
{ |
|
|
|
char pcBuffer[52] = {0}; |
|
|
|
//char pcBuffer2[52] = {0};
|
|
|
|
|
|
|
|
while(1) |
|
|
|
{ |
|
|
|
//__disable_irq();
|
|
|
|
rd_ComRead(g_ptSbus, pcBuffer, 25); |
|
|
|
//rd_ComRead(g_ptlpuart, pcBuffer2, 25);
|
|
|
|
//__enable_irq();
|
|
|
|
//Rd_Delay(1);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void Read_PV(void *argument) |
|
|
|
{ |
|
|
|
char pcBuffer[64] = {0}; |
|
|
|
|
|
|
|
while(1) |
|
|
|
{ |
|
|
|
rd_ComRead(g_ptlpuart, pcBuffer, 64); |
|
|
|
Rd_Delay(10); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -265,9 +271,16 @@ void Drv_InterfaceInit(void) |
|
|
|
}; |
|
|
|
(void)osThreadNew(Read_MK32, NULL, &MK32_Task_attributes); |
|
|
|
|
|
|
|
// TUartUserData *ptUartUserData = UART_userdata_init(0, -1, 512);
|
|
|
|
// g_ptlpuart = rd_ComCreate(check_PV, decode_PV, LPUART_PV_Send, ptUartUserData->m_buf_size, ptUartUserData);
|
|
|
|
// UART_IT_init(g_ptlpuart);
|
|
|
|
TUartUserData *ptUartUserData = UART_userdata_init(0, -1, 512); |
|
|
|
g_ptlpuart = rd_ComCreate(check_PV, decode_PV, LPUART_PV_Send, ptUartUserData->m_buf_size, ptUartUserData); |
|
|
|
UART_IT_init(g_ptlpuart); |
|
|
|
|
|
|
|
const osThreadAttr_t Read_PV_attributes = { |
|
|
|
.name = "Read_PV", |
|
|
|
.stack_size = 2048, |
|
|
|
.priority = (osPriority_t) osPriorityHigh6, |
|
|
|
}; |
|
|
|
(void)osThreadNew(Read_PV, NULL, &Read_PV_attributes); |
|
|
|
//
|
|
|
|
// const osThreadAttr_t Send_PV_attributes = {
|
|
|
|
// .name = "Send_PV",
|
|
|
|
|