|
|
@ -104,12 +104,12 @@ static int check_Spoolend(char *_pBuffer, uint32_t _iSize) |
|
|
|
|
|
|
|
|
static void decode_RS485_1(const char *_pBuffer, uint32_t _iSize) |
|
|
static void decode_RS485_1(const char *_pBuffer, uint32_t _iSize) |
|
|
{ |
|
|
{ |
|
|
rd_ComWrite(g_ptRS485_1, (char *)_pBuffer, _iSize); |
|
|
//rd_ComWrite(g_ptRS485_1, (char *)_pBuffer, _iSize);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static void decode_RS485_2(const char *_pBuffer, uint32_t _iSize) |
|
|
static void decode_RS485_2(const char *_pBuffer, uint32_t _iSize) |
|
|
{ |
|
|
{ |
|
|
rd_ComWrite(g_ptRS485_2, (char *)_pBuffer, _iSize); |
|
|
//rd_ComWrite(g_ptRS485_2, (char *)_pBuffer, _iSize);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static void decode_Spoolend(const char *_pBuffer, uint32_t _iSize) |
|
|
static void decode_Spoolend(const char *_pBuffer, uint32_t _iSize) |
|
|
@ -187,13 +187,13 @@ void SpoolendTask(void) |
|
|
char pcBuffer2[52] = {0}; |
|
|
char pcBuffer2[52] = {0}; |
|
|
char pcBuffer3[52] = {0}; |
|
|
char pcBuffer3[52] = {0}; |
|
|
__disable_irq(); |
|
|
__disable_irq(); |
|
|
rd_ComRead(g_ptRS485_1, pcBuffer1, sizeof(pcBuffer1)); |
|
|
int i485_1 = rd_ComRead(g_ptRS485_1, pcBuffer1, sizeof(pcBuffer1)); |
|
|
rd_ComRead(g_ptRS485_2, pcBuffer2, sizeof(pcBuffer2)); |
|
|
int i485_2 = rd_ComRead(g_ptRS485_2, pcBuffer2, sizeof(pcBuffer2)); |
|
|
rd_ComRead(g_ptFDCAN1, pcBuffer3, sizeof(pcBuffer3)); |
|
|
rd_ComRead(g_ptFDCAN1, pcBuffer3, sizeof(pcBuffer3)); |
|
|
__enable_irq(); |
|
|
__enable_irq(); |
|
|
|
|
|
|
|
|
// rd_ComWrite(g_ptRS485_1, "Hello\n", 6);
|
|
|
if (i485_1 > 0) rd_ComWrite(g_ptRS485_1, pcBuffer1, i485_1); |
|
|
// rd_ComWrite(g_ptRS485_2, "Hello\n", 6);
|
|
|
if (i485_2 > 0) rd_ComWrite(g_ptRS485_2, pcBuffer2, i485_2); |
|
|
// rd_ComIDWrite(g_ptFDCAN1, 1, "Hello\n", 6);
|
|
|
// rd_ComIDWrite(g_ptFDCAN1, 1, "Hello\n", 6);
|
|
|
|
|
|
|
|
|
HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin); |
|
|
HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin); |
|
|
@ -208,6 +208,5 @@ void SpoolendTask(void) |
|
|
rd_ComSendProc(g_ptRS485_1); |
|
|
rd_ComSendProc(g_ptRS485_1); |
|
|
rd_ComSendProc(g_ptRS485_2); |
|
|
rd_ComSendProc(g_ptRS485_2); |
|
|
rd_ComSendProc(g_ptFDCAN1); |
|
|
rd_ComSendProc(g_ptFDCAN1); |
|
|
HAL_Delay(10); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|