add SW Version

This commit is contained in:
2022-12-07 10:49:18 +01:00
parent a237949da4
commit 39704f6cc3

View File

@ -55,6 +55,9 @@
// Description: Definition of local constants (visible by this module only). // Description: Definition of local constants (visible by this module only).
//================================================================================================= //=================================================================================================
/* Software Version */
#define SW_VERSION 1
#define MSG_QUEUE_SIZE 8 #define MSG_QUEUE_SIZE 8
#define EVENT_NEW_MESSAGE ((U32)(1<<0)) #define EVENT_NEW_MESSAGE ((U32)(1<<0))
@ -69,6 +72,7 @@
#define COMMAND_WATCHDOG 3 #define COMMAND_WATCHDOG 3
#define COMMAND_ALARM 4 #define COMMAND_ALARM 4
#define COMMAND_CLEAR_ERROR 5 #define COMMAND_CLEAR_ERROR 5
#define COMMAND_GET_SW_VERSION 6
#define COMMAND_REBOOT 255 #define COMMAND_REBOOT 255
@ -282,6 +286,11 @@ PRIVATE VOID vTask( PVOID arg )
PECO_Enable( FALSE ); PECO_Enable( FALSE );
HAL_NVIC_SystemReset(); HAL_NVIC_SystemReset();
break; break;
case COMMAND_GET_SW_VERSION:
au8Buffer[0] = COMMAND_GET_SW_VERSION;
au8Buffer[1] = SW_VERSION;
CAND_boSendMessage( au8Buffer, 2, stMessage.boIsPrivate, stMessage.u8Type );
break;
default: default:
break; break;
} }