mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-12-03 17:21:29 +00:00
Fix SDIO buffer alignment (#21396)
This commit is contained in:
parent
0f9e096d6e
commit
e9618f1ba2
@ -51,7 +51,12 @@ inline int bs_read_serial(const uint8_t index) {
|
||||
|
||||
#if ENABLED(BINARY_STREAM_COMPRESSION)
|
||||
static heatshrink_decoder hsd;
|
||||
static uint8_t decode_buffer[512] = {};
|
||||
#ifdef BOTH(ARDUINO_ARCH_STM32F1, SDIO_SUPPORT)
|
||||
// STM32 requires a word-aligned buffer for SD card transfers via DMA
|
||||
static __attribute__((aligned(sizeof(size_t)))) uint8_t decode_buffer[512] = {};
|
||||
#else
|
||||
static uint8_t decode_buffer[512] = {};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class SDFileTransferProtocol {
|
||||
|
Loading…
Reference in New Issue
Block a user