8000 oofatfs: Remove _FS_DISK_READ_ALIGNED · gregdavill/circuitpython@eef742b · GitHub
[go: up one dir, main page]

Skip to content

Commit eef742b

Browse files
committed
oofatfs: Remove _FS_DISK_READ_ALIGNED
This workaround is no longer needed, so it can be removed. Closes: adafruit#2332
1 parent 1e6c08f commit eef742b

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

lib/oofatfs/ff.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3382,11 +3382,7 @@ FRESULT f_read (
33823382
if (!sect) ABORT(fs, FR_INT_ERR);
33833383
sect += csect;
33843384
cc = btr / SS(fs); /* When remaining bytes >= sector size, */
3385-
if (cc
3386-
#if _FS_DISK_READ_ALIGNED
3387-
&& (((int)rbuff & 3) == 0)
3388-
#endif
3389-
) {/* Read maximum contiguous sectors directly */
3385+
if (cc) {/* Read maximum contiguous sectors directly */
33903386
if (csect + cc > fs->csize) { /* Clip at cluster boundary */
33913387
cc = fs->csize - csect;
33923388
}

lib/oofatfs/ffconf.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,6 @@
343343
/ SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be
344344
/ included somewhere in the scope of ff.h. */
345345

346-
// Set to nonzero if buffers passed to disk_read have a word alignment
347-
// restriction
348-
#ifndef _FS_DISK_READ_ALIGNED
349-
#define _FS_DISK_READ_ALIGNED 0
350-
#endif
351-
352346
/* #include <windows.h> // O/S definitions */
353347

354348

ports/nrf/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ CFLAGS += -Wno-undef
102102
CFLAGS += -Wno-cast-align
103103

104104
NRF_DEFINES += -DCONFIG_GPIO_AS_PINRESET
105-
NRF_DEFINES += -D_FS_DISK_READ_ALIGNED=1
106105
CFLAGS += $(NRF_DEFINES)
107106

108107
CFLAGS += \

0 commit comments

Comments
 (0)
0