Remove some assumptions on packet format

This commit is contained in:
zvecr 2022-03-30 02:09:19 +01:00
parent 22b8299230
commit 7f128c5286
4 changed files with 52 additions and 34 deletions

View file

@ -41,4 +41,16 @@ bool xap_respond_data_P(xap_token_t token, const void *data, size_t length);
void xap_send(xap_token_t token, xap_response_flags_t response_flags, const void *data, size_t length);
// TODO: gen from xap defs?
typedef struct {
xap_token_t token;
uint8_t length;
} xap_request_header_t;
typedef struct {
xap_token_t token;
xap_response_flags_t flags;
uint8_t length;
} xap_response_header_t;
#include <xap_generated.h>