diff options
| author | hathach <[email protected]> | 2024-11-21 17:49:38 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-11-21 17:49:38 +0700 |
| commit | dbdc5a239c42e96eeeb8759a121798fa9b3f39c3 (patch) | |
| tree | 0e5dadec079b5509ba5f9a5770092001b87f76b6 /src/class/dfu/dfu_device.c | |
| parent | 5d77faa835ab7faf73a9981905e57e8d79920d2d (diff) | |
- move freertos_hooks to board.c
- add device/midi_test_freertos example
- update bth/dfu/midi device for cache line size
Diffstat (limited to 'src/class/dfu/dfu_device.c')
| -rw-r--r-- | src/class/dfu/dfu_device.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/class/dfu/dfu_device.c b/src/class/dfu/dfu_device.c index 71e7ac2b3..875bd4e09 100644 --- a/src/class/dfu/dfu_device.c +++ b/src/class/dfu/dfu_device.c @@ -47,8 +47,7 @@ //--------------------------------------------------------------------+ // INTERNAL OBJECT & FUNCTION DECLARATION //--------------------------------------------------------------------+ -typedef struct -{ +typedef struct { uint8_t attrs; uint8_t alt; @@ -59,14 +58,16 @@ typedef struct uint16_t block; uint16_t length; - CFG_TUSB_MEM_ALIGN uint8_t transfer_buf[CFG_TUD_DFU_XFER_BUFSIZE]; + union { + CFG_TUD_MEM_ALIGN uint8_t transfer_buf[CFG_TUD_DFU_XFER_BUFSIZE]; + TUD_DCACHE_PADDING; + }; } dfu_state_ctx_t; // Only a single dfu state is allowed CFG_TUD_MEM_SECTION tu_static dfu_state_ctx_t _dfu_ctx; -static void reset_state(void) -{ +static void reset_state(void) { _dfu_ctx.state = DFU_IDLE; _dfu_ctx.status = DFU_STATUS_OK; _dfu_ctx.flashing_in_progress = false; |
