|
|
@ -23,7 +23,7 @@ typedef enum _MessageType {
|
|
|
|
MessageType_MessageType_ButtonRequest = 26,
|
|
|
|
MessageType_MessageType_ButtonRequest = 26,
|
|
|
|
MessageType_MessageType_ButtonAck = 27,
|
|
|
|
MessageType_MessageType_ButtonAck = 27,
|
|
|
|
MessageType_MessageType_GetFeatures = 55,
|
|
|
|
MessageType_MessageType_GetFeatures = 55,
|
|
|
|
MessageType_MessageType_AttestationDelete = 96
|
|
|
|
MessageType_MessageType_UnlockBootloader = 96
|
|
|
|
} MessageType;
|
|
|
|
} MessageType;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum _FailureType {
|
|
|
|
typedef enum _FailureType {
|
|
|
@ -38,10 +38,6 @@ typedef enum _ButtonRequestType {
|
|
|
|
} ButtonRequestType;
|
|
|
|
} ButtonRequestType;
|
|
|
|
|
|
|
|
|
|
|
|
/* Struct definitions */
|
|
|
|
/* Struct definitions */
|
|
|
|
typedef struct _AttestationDelete {
|
|
|
|
|
|
|
|
char dummy_field;
|
|
|
|
|
|
|
|
} AttestationDelete;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _ButtonAck {
|
|
|
|
typedef struct _ButtonAck {
|
|
|
|
char dummy_field;
|
|
|
|
char dummy_field;
|
|
|
|
} ButtonAck;
|
|
|
|
} ButtonAck;
|
|
|
@ -54,6 +50,10 @@ typedef struct _Initialize {
|
|
|
|
char dummy_field;
|
|
|
|
char dummy_field;
|
|
|
|
} Initialize;
|
|
|
|
} Initialize;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _UnlockBootloader {
|
|
|
|
|
|
|
|
char dummy_field;
|
|
|
|
|
|
|
|
} UnlockBootloader;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _ButtonRequest {
|
|
|
|
typedef struct _ButtonRequest {
|
|
|
|
bool has_code;
|
|
|
|
bool has_code;
|
|
|
|
ButtonRequestType code;
|
|
|
|
ButtonRequestType code;
|
|
|
@ -135,8 +135,8 @@ typedef struct _Success {
|
|
|
|
|
|
|
|
|
|
|
|
/* Helper constants for enums */
|
|
|
|
/* Helper constants for enums */
|
|
|
|
#define _MessageType_MIN MessageType_MessageType_Initialize
|
|
|
|
#define _MessageType_MIN MessageType_MessageType_Initialize
|
|
|
|
#define _MessageType_MAX MessageType_MessageType_AttestationDelete
|
|
|
|
#define _MessageType_MAX MessageType_MessageType_UnlockBootloader
|
|
|
|
#define _MessageType_ARRAYSIZE ((MessageType)(MessageType_MessageType_AttestationDelete+1))
|
|
|
|
#define _MessageType_ARRAYSIZE ((MessageType)(MessageType_MessageType_UnlockBootloader+1))
|
|
|
|
|
|
|
|
|
|
|
|
#define _FailureType_MIN FailureType_Failure_UnexpectedMessage
|
|
|
|
#define _FailureType_MIN FailureType_Failure_UnexpectedMessage
|
|
|
|
#define _FailureType_MAX FailureType_Failure_ProcessError
|
|
|
|
#define _FailureType_MAX FailureType_Failure_ProcessError
|
|
|
@ -163,7 +163,7 @@ extern "C" {
|
|
|
|
#define FirmwareErase_init_default {false, 0}
|
|
|
|
#define FirmwareErase_init_default {false, 0}
|
|
|
|
#define FirmwareRequest_init_default {0, 0}
|
|
|
|
#define FirmwareRequest_init_default {0, 0}
|
|
|
|
#define FirmwareUpload_init_default {{{NULL}, NULL}, false, {0, {0}}}
|
|
|
|
#define FirmwareUpload_init_default {{{NULL}, NULL}, false, {0, {0}}}
|
|
|
|
#define AttestationDelete_init_default {0}
|
|
|
|
#define UnlockBootloader_init_default {0}
|
|
|
|
#define Initialize_init_zero {0}
|
|
|
|
#define Initialize_init_zero {0}
|
|
|
|
#define GetFeatures_init_zero {0}
|
|
|
|
#define GetFeatures_init_zero {0}
|
|
|
|
#define Features_init_zero {false, "", 0, 0, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, "", false, 0, false, 0, false, 0, false, "", false, "", false, 0, false, 0}
|
|
|
|
#define Features_init_zero {false, "", 0, 0, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, "", false, 0, false, 0, false, 0, false, "", false, "", false, 0, false, 0}
|
|
|
@ -175,7 +175,7 @@ extern "C" {
|
|
|
|
#define FirmwareErase_init_zero {false, 0}
|
|
|
|
#define FirmwareErase_init_zero {false, 0}
|
|
|
|
#define FirmwareRequest_init_zero {0, 0}
|
|
|
|
#define FirmwareRequest_init_zero {0, 0}
|
|
|
|
#define FirmwareUpload_init_zero {{{NULL}, NULL}, false, {0, {0}}}
|
|
|
|
#define FirmwareUpload_init_zero {{{NULL}, NULL}, false, {0, {0}}}
|
|
|
|
#define AttestationDelete_init_zero {0}
|
|
|
|
#define UnlockBootloader_init_zero {0}
|
|
|
|
|
|
|
|
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
|
|
#define ButtonRequest_code_tag 1
|
|
|
|
#define ButtonRequest_code_tag 1
|
|
|
@ -285,10 +285,10 @@ X(a, STATIC, OPTIONAL, BYTES, hash, 2)
|
|
|
|
#define FirmwareUpload_CALLBACK pb_default_field_callback
|
|
|
|
#define FirmwareUpload_CALLBACK pb_default_field_callback
|
|
|
|
#define FirmwareUpload_DEFAULT NULL
|
|
|
|
#define FirmwareUpload_DEFAULT NULL
|
|
|
|
|
|
|
|
|
|
|
|
#define AttestationDelete_FIELDLIST(X, a) \
|
|
|
|
#define UnlockBootloader_FIELDLIST(X, a) \
|
|
|
|
|
|
|
|
|
|
|
|
#define AttestationDelete_CALLBACK NULL
|
|
|
|
#define UnlockBootloader_CALLBACK NULL
|
|
|
|
#define AttestationDelete_DEFAULT NULL
|
|
|
|
#define UnlockBootloader_DEFAULT NULL
|
|
|
|
|
|
|
|
|
|
|
|
extern const pb_msgdesc_t Initialize_msg;
|
|
|
|
extern const pb_msgdesc_t Initialize_msg;
|
|
|
|
extern const pb_msgdesc_t GetFeatures_msg;
|
|
|
|
extern const pb_msgdesc_t GetFeatures_msg;
|
|
|
@ -301,7 +301,7 @@ extern const pb_msgdesc_t ButtonAck_msg;
|
|
|
|
extern const pb_msgdesc_t FirmwareErase_msg;
|
|
|
|
extern const pb_msgdesc_t FirmwareErase_msg;
|
|
|
|
extern const pb_msgdesc_t FirmwareRequest_msg;
|
|
|
|
extern const pb_msgdesc_t FirmwareRequest_msg;
|
|
|
|
extern const pb_msgdesc_t FirmwareUpload_msg;
|
|
|
|
extern const pb_msgdesc_t FirmwareUpload_msg;
|
|
|
|
extern const pb_msgdesc_t AttestationDelete_msg;
|
|
|
|
extern const pb_msgdesc_t UnlockBootloader_msg;
|
|
|
|
|
|
|
|
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
|
|
#define Initialize_fields &Initialize_msg
|
|
|
|
#define Initialize_fields &Initialize_msg
|
|
|
@ -315,11 +315,10 @@ extern const pb_msgdesc_t AttestationDelete_msg;
|
|
|
|
#define FirmwareErase_fields &FirmwareErase_msg
|
|
|
|
#define FirmwareErase_fields &FirmwareErase_msg
|
|
|
|
#define FirmwareRequest_fields &FirmwareRequest_msg
|
|
|
|
#define FirmwareRequest_fields &FirmwareRequest_msg
|
|
|
|
#define FirmwareUpload_fields &FirmwareUpload_msg
|
|
|
|
#define FirmwareUpload_fields &FirmwareUpload_msg
|
|
|
|
#define AttestationDelete_fields &AttestationDelete_msg
|
|
|
|
#define UnlockBootloader_fields &UnlockBootloader_msg
|
|
|
|
|
|
|
|
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
|
|
/* FirmwareUpload_size depends on runtime parameters */
|
|
|
|
/* FirmwareUpload_size depends on runtime parameters */
|
|
|
|
#define AttestationDelete_size 0
|
|
|
|
|
|
|
|
#define ButtonAck_size 0
|
|
|
|
#define ButtonAck_size 0
|
|
|
|
#define ButtonRequest_size 2
|
|
|
|
#define ButtonRequest_size 2
|
|
|
|
#define Failure_size 260
|
|
|
|
#define Failure_size 260
|
|
|
@ -330,6 +329,7 @@ extern const pb_msgdesc_t AttestationDelete_msg;
|
|
|
|
#define Initialize_size 0
|
|
|
|
#define Initialize_size 0
|
|
|
|
#define Ping_size 258
|
|
|
|
#define Ping_size 258
|
|
|
|
#define Success_size 258
|
|
|
|
#define Success_size 258
|
|
|
|
|
|
|
|
#define UnlockBootloader_size 0
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
} /* extern "C" */
|
|
|
|