usb: mass_storage: align page buffer
Flash drivers may impose alignment requirements on the destination buffers due to use of DMA transfers. In particular Nordic QSPI flash API requires that addresses, sizes, and buffers all by 4-byte aligned. Align the page buffer to satisfy this requirement. Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
parent
28a6829b74
commit
ebd19ad10b
1 changed files with 4 additions and 1 deletions
|
@ -113,8 +113,11 @@ static volatile u32_t defered_wr_sz;
|
|||
* Keep block buffer larger than BLOCK_SIZE for the case
|
||||
* the dCBWDataTransferLength is multiple of the BLOCK_SIZE and
|
||||
* the length of the transferred data is not aligned to the BLOCK_SIZE.
|
||||
*
|
||||
* Align for cases where the underlying disk access requires word-aligned
|
||||
* addresses.
|
||||
*/
|
||||
static u8_t page[BLOCK_SIZE + CONFIG_MASS_STORAGE_BULK_EP_MPS];
|
||||
static u8_t __aligned(4) page[BLOCK_SIZE + CONFIG_MASS_STORAGE_BULK_EP_MPS];
|
||||
|
||||
/* Initialized during mass_storage_init() */
|
||||
static u32_t memory_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue