feat(fatfs/diskio): Remove const from PARTITION VolToPart

Closes https://github.com/espressif/esp-idf/issues/14148
This commit is contained in:
Adam Múdry
2024-11-25 22:15:29 +01:00
parent 475301889e
commit f7054acf46
3 changed files with 5 additions and 4 deletions

View File

@ -1,10 +1,10 @@
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2016 */ /* Low level disk I/O module skeleton for FatFs (C)ChaN, 2016 */
/* ESP-IDF port Copyright 2016 Espressif Systems (Shanghai) PTE LTD */ /* ESP-IDF port Copyright 2016-2025 Espressif Systems (Shanghai) PTE LTD */
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
/* If a working storage control module is available, it should be */ /* If a working storage control module is available, it should be */
/* attached to the FatFs via a glue function rather than modifying it. */ /* attached to the FatFs via a glue function rather than modifying it. */
/* This is an example of glue functions to attach various existing */ /* This is an example of glue functions to attach various existing */
/* storage control modules to the FatFs module with a defined API. */ /* storage control modules to the FatFs module with a defined API. */
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
@ -19,7 +19,7 @@
static ff_diskio_impl_t * s_impls[FF_VOLUMES] = { NULL }; static ff_diskio_impl_t * s_impls[FF_VOLUMES] = { NULL };
#if FF_MULTI_PARTITION /* Multiple partition configuration */ #if FF_MULTI_PARTITION /* Multiple partition configuration */
const PARTITION VolToPart[FF_VOLUMES] = { PARTITION VolToPart[FF_VOLUMES] = {
{0, 0}, /* Logical drive 0 ==> Physical drive 0, auto detection */ {0, 0}, /* Logical drive 0 ==> Physical drive 0, auto detection */
#if FF_VOLUMES > 1 #if FF_VOLUMES > 1
{1, 0}, /* Logical drive 1 ==> Physical drive 1, auto detection */ {1, 0}, /* Logical drive 1 ==> Physical drive 1, auto detection */

View File

@ -116,7 +116,7 @@ typedef struct {
BYTE pd; /* Physical drive number */ BYTE pd; /* Physical drive number */
BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */ BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */
} PARTITION; } PARTITION;
extern const PARTITION VolToPart[]; /* Volume - Partition mapping table */ extern PARTITION VolToPart[]; /* Volume - Partition mapping table */
#endif #endif
#if FF_STR_VOLUME_ID #if FF_STR_VOLUME_ID

View File

@ -22,6 +22,7 @@
#include "tinyusb.h" #include "tinyusb.h"
#include "tusb_msc_storage.h" #include "tusb_msc_storage.h"
#ifdef CONFIG_EXAMPLE_STORAGE_MEDIA_SDMMC #ifdef CONFIG_EXAMPLE_STORAGE_MEDIA_SDMMC
#include "sdmmc_cmd.h"
#include "diskio_impl.h" #include "diskio_impl.h"
#include "diskio_sdmmc.h" #include "diskio_sdmmc.h"
#if CONFIG_EXAMPLE_SD_PWR_CTRL_LDO_INTERNAL_IO #if CONFIG_EXAMPLE_SD_PWR_CTRL_LDO_INTERNAL_IO