...
Code Block |
---|
#define APPL_CM_VARS \ /* Name, Data type, Max. size, Validation Cb, Change Cb */ \ GOAL_CM_VAR(APPL_CM_VAR_ENABLE, GOAL_CM_UINT8, sizeof(uint8_t), NULL, appl_cmChg), \ GOAL_CM_VAR(APPL_CM_VAR_BAUD, GOAL_CM_UINT32, sizeof(uint32_t), NULL, appl_cmChg), \ GOAL_CM_VAR(APPL_CM_VAR_PASSWORD, GOAL_CM_GENERIC, APPL_CM_PASSWORD_LEN, NULL, appl_cmChg), \ GOAL_CM_VAR(APPL_CM_VAR_USER, GOAL_CM_STRING, APPL_CM_STRING_LEN, NULL, appl_cmChg), \ GOAL_CM_VAR(APPL_CM_VAR_FWVERSIONFWREV, GOAL_CM_STRING, APPL_CM_STRING_LEN, NULL, NULL) |
...
APPL_CM_VAR_ENABLE
as uint8 for enabling/disabling the serial interface,APPL_CM_VAR_BAUD
as uint32 for storing the baud rate to use,APPL_CM_VAR_PASSWORD
as blob for storing the hashed password,APPL_CM_VAR_USER
as string for storing the username for login andAPPL_CM_VAR_FWVERSIONFWREV
as string for storing the current firmware revision.
...
Code Block |
---|
#define APPL_CM_FWVERSION_VIRTUAL_ID (1024) ... /* register virtual fw revision variable. Module must be known to the cm */ res = goal_cmRegVarVirtual(APPL_CM_MOD_ID, APPL_CM_FWVERSIONFWREV_VIRTUAL_ID, GOAL_CM_GENERIC, APPL_CM_STRING_LEN, NULL, NULL); if (GOAL_RES_ERR(res)) { goal_logErr("error registering virtual fw revision variable"); } |
...