26#ifndef RCBENCH_FW_UPLOAD_H
27#define RCBENCH_FW_UPLOAD_H
The panel's application image, read from memory: what it is, whether it is whole, and whether it is o...
fw_err_t
Definition fw_image.h:61
unsigned fw_upload_percent(const fw_upload_t *u)
Received of announced.
Definition fw_upload.c:130
void fw_upload_init(fw_upload_t *u, uint8_t *buf, uint32_t cap, uint32_t slot)
An upload into buf of cap bytes, for a slot of slot bytes: IDLE.
Definition fw_upload.c:12
bool fw_upload_busy(const fw_upload_t *u)
Whether the buffer is in use: bytes arriving, or a check under way. A caller frees the buffer of an u...
Definition fw_upload.c:117
fw_err_t fw_upload_begin(fw_upload_t *u, uint32_t bytes)
A source announces bytes.
Definition fw_upload.c:21
fw_err_t fw_upload_checked(fw_upload_t *u, fw_err_t e, const fw_image_info_t *info)
The second half: the answer of the check over a sealed upload.
Definition fw_upload.c:86
fw_err_t fw_upload_end(fw_upload_t *u, bool whole)
The source is done; the image is checked at once.
Definition fw_upload.c:105
fw_err_t fw_upload_add(fw_upload_t *u, const uint8_t *data, uint32_t len)
len more bytes.
Definition fw_upload.c:56
void fw_upload_discard(fw_upload_t *u)
Drop what is received or staged: IDLE. During a check, IDLE once fw_upload_checked() has its answer.
Definition fw_upload.c:122
fw_err_t fw_upload_seal(fw_upload_t *u, bool whole)
The first half of fw_upload_end(), for a check run without the caller's lock: the bytes are whole and...
Definition fw_upload.c:71
fw_up_state_t
Where an upload is.
Definition fw_upload.h:39
@ FW_UP_RECEIVING
Definition fw_upload.h:41
@ FW_UP_IDLE
Definition fw_upload.h:40
@ FW_UP_FAILED
Definition fw_upload.h:43
@ FW_UP_STAGED
Definition fw_upload.h:42
An upload into a buffer the caller owns.
Definition fw_upload.h:47
fw_image_info_t info
Definition fw_upload.h:55
fw_up_state_t state
Definition fw_upload.h:53
uint32_t done
Definition fw_upload.h:52
bool checking
Definition fw_upload.h:56
fw_err_t err
Definition fw_upload.h:54
uint32_t bytes
Definition fw_upload.h:51
uint32_t slot
Definition fw_upload.h:50
uint8_t * buf
Definition fw_upload.h:48
uint32_t cap
Definition fw_upload.h:49