Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix buffer alignment for SDIO #21396

Merged
merged 5 commits into from
Mar 24, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Marlin/src/feature/binary_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ inline int bs_read_serial(const serial_index_t index) {

#if ENABLED(BINARY_STREAM_COMPRESSION)
static heatshrink_decoder hsd;
#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 // ARDUINO_ARCH_STM32F1
#endif // BOTH(ARDUINO_ARCH_STM32F1, SDIO_SUPPORT)
ldursw marked this conversation as resolved.
Show resolved Hide resolved

class SDFileTransferProtocol {
private:
Expand Down