Skip to content

Commit b96c7c0

Browse files
committed
stmhal: Move fatfs volume/partition lookup table to ROM.
1 parent 6042786 commit b96c7c0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

stmhal/diskio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "storage.h"
1616
#include "sdcard.h"
1717

18-
PARTITION VolToPart[] = {
18+
const PARTITION VolToPart[] = {
1919
{0, 1}, // Logical drive 0 ==> Physical drive 0, 1st partition
2020
{1, 0}, // Logical drive 1 ==> Physical drive 1 (auto detection)
2121
/*

stmhal/fatfs/src/ff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef struct {
3737
BYTE pd; /* Physical drive number */
3838
BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */
3939
} PARTITION;
40-
extern PARTITION VolToPart[]; /* Volume - Partition resolution table */
40+
extern const PARTITION VolToPart[]; /* Volume - Partition resolution table */
4141
#define LD2PD(vol) (VolToPart[vol].pd) /* Get physical drive number */
4242
#define LD2PT(vol) (VolToPart[vol].pt) /* Get partition index */
4343

0 commit comments

Comments
 (0)