Skip to content

Instantly share code, notes, and snippets.

@simonseyer
Last active April 8, 2022 18:28
Show Gist options
  • Save simonseyer/d658c6850ff75f9db45416ea254b615b to your computer and use it in GitHub Desktop.
Save simonseyer/d658c6850ff75f9db45416ea254b615b to your computer and use it in GitHub Desktop.
typedef enum {
PROTO_UPLOAD_IN_PROGRESS = 0,
PROTO_UPLOAD_DONE,
PROTO_UPLOAD_FAILED,
PROTO_UPLOAD_NO_CONNECTION
} proto_upload_status_t;
typedef struct {
uint8_t data_id;
proto_upload_status_t status;
uint32_t transmitted_size;
} proto_upload_info_t;
/**
Sending:
data_id 0 0x00
status PROTO_UPLOAD_NO_CONNECTION 0x03
transmitted_size 0 0x00
Receiving:
data_id 0 0x00
status PROTO_UPLOAD_IN_PROGRESS 0x00
transmitted_size 3 0x03
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment