// Auto-generated template file: command_LASTERROR.tpl.c // Generation timestamp: 2021-06-21 19:42:34.864200 #include "../typedefs.h" #include "../communication.h" #include "../hardware.h" err_t command_LASTERROR(void) { // Command: LASTERROR // Description: Return the last occurred error, and reset it to NOERR value // // Request code: CMDCODE_LASTERROR_REQ // Response code: CMDCODE_LASTERROR_REQ // Request payload (length in bytes is 0): // Response payload (length in bytes is 1): // field #0 (1 byte) [type: uint8_t ] : ERRCODE (Error code) // Auto-generated section: request payload fields reading // End of auto-generated section // USER CODE HERE // TODO implement command callback function command_LASTERROR // TODO: assign response field ERRCODE in command LASTERROR callback uint8_t resp_errcode = -1; // Auto-generated section: response payload fields writing communication_response_payload_appender_reset(); communication_response_payload_append_uint8_t((uint8_t)resp_errcode); return NOERR; // End of auto-generated section }