Skip to content

Commit

Permalink
Adds error codes defined by the firmware upgrade standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz committed Dec 23, 2020
1 parent 96d5ab8 commit e70af5b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/openlcb/Defs.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ struct Defs

};

enum ErrorCodes {
enum ErrorCodes
{
ERROR_CODE_OK = 0,

ERROR_PERMANENT = 0x1000,
Expand All @@ -182,6 +183,15 @@ struct Defs

ERROR_OPENMRN_ALREADY_EXISTS = ERROR_OPENMRN_NOT_FOUND | 2,

// Codes defined by the firmware upgrade standard

/// The firmware data is incompatible with this hardware node.
ERROR_FIRMWARE_INCOMPATIBLE = ERROR_INVALID_ARGS | 8,
/// The firmware data is invalid or corrupted.
ERROR_FIRMWARE_CORRUPTED = ERROR_INVALID_ARGS | 9,
/// The firmware written has failed checksum (temporary error).
ERROR_FIRMWARE_CSUM = 0x2088,

// Internal error codes generated by the stack.
ERROR_DST_NOT_FOUND = 0x40000, //< on CAN. Permanent error code.
// There is a conflict with MinGW macros here.
Expand Down

0 comments on commit e70af5b

Please sign in to comment.