diff options
| author | hathach <[email protected]> | 2025-11-19 13:36:32 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-11-19 13:36:32 +0700 |
| commit | b2dc419270d17f100ec04cd18e764fe66d298f77 (patch) | |
| tree | 2e47e3be1c4717be2071ed924437313bbc089c37 /src/class/dfu | |
| parent | 1df116adfc70bb6d86f6046b46560d5c42762c28 (diff) | |
rename CFG_TUD_ENDPOINT0_BUFSIZE to make it more consistent
use uint8_t for dfu state and status to reduce size
Diffstat (limited to 'src/class/dfu')
| -rw-r--r-- | src/class/dfu/dfu_device.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/class/dfu/dfu_device.c b/src/class/dfu/dfu_device.c index ffe5941e8..d3cc53918 100644 --- a/src/class/dfu/dfu_device.c +++ b/src/class/dfu/dfu_device.c @@ -50,19 +50,17 @@ typedef struct { uint8_t attrs; uint8_t alt; + uint8_t state; + uint8_t status; - dfu_state_t state; - dfu_status_t status; - - bool flashing_in_progress; + bool flashing_in_progress; uint16_t block; uint16_t length; } dfu_state_ctx_t; -// Only a single dfu state is allowed static dfu_state_ctx_t _dfu_ctx; -CFG_TUD_MEM_ALIGN uint8_t _transfer_buf[CFG_TUD_DFU_XFER_BUFSIZE]; +TU_ATTR_ALIGNED(4) uint8_t _transfer_buf[CFG_TUD_DFU_XFER_BUFSIZE]; static void reset_state(void) { _dfu_ctx.state = DFU_IDLE; |
