Skip to content
Permalink
Browse files

sdhc: rename disk_access_sdhc.c

The name disk_access_sdhc.c is ambiguous,

actually this driver depends on SPI,

rename this file.

In addition, move the generic sdhc stuff from C file

to head file for other sdhc drivers to use.

1) disk_access_sdhc.c->disk_access_spi_sdhc.c.

2) create .h and move sdhc specifications from .c to .h.

Signed-off-by: Jun Yang <jun.yang@nxp.com>
  • Loading branch information...
JunYangNXP authored and MaureenHelm committed Jul 4, 2019
1 parent 3bddc20 commit c7e625f2b39b75ef6d06de1c29749ad99b710f4b
@@ -326,6 +326,8 @@
/subsys/bluetooth/ @joerchan @jhedberg @Vudentz
/subsys/bluetooth/controller/ @carlescufi @cvinayak @thoh-ot
/subsys/debug/ @nashif
/subsys/disk/disk_access_spi_sdhc.c @JunYangNXP
/subsys/disk/disk_access_sdhc.h @JunYangNXP
/subsys/fs/ @nashif
/subsys/fs/fcb/ @nvlsianpu
/subsys/fs/fuse_fs_access.c @vanwinkeljan
@@ -50,6 +50,9 @@ struct disk_info {
sys_dnode_t node;
char *name;
const struct disk_operations *ops;
/* Disk device associated to this disk.
*/
struct device *dev;
};

struct disk_operations {
@@ -2,8 +2,9 @@ CONFIG_SPI=y
CONFIG_SPI_1=y
CONFIG_DISK_ACCESS=y
CONFIG_DISK_ACCESS_SDHC=y
CONFIG_DISK_ACCESS_SPI_SDHC=y
CONFIG_DISK_SDHC_VOLUME_NAME="SD"
CONFIG_LOG=y
CONFIG_FILE_SYSTEM=y
CONFIG_FAT_FILESYSTEM_ELM=y
CONFIG_PRINTK=y
CONFIG_PRINTK=y
@@ -3,4 +3,4 @@
zephyr_sources_ifdef(CONFIG_DISK_ACCESS disk_access.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_FLASH disk_access_flash.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_RAM disk_access_ram.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_SDHC disk_access_sdhc.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_SPI_SDHC disk_access_spi_sdhc.c)
@@ -94,9 +94,16 @@ config DISK_VOLUME_SIZE
endif # DISK_ACCESS_FLASH

config DISK_ACCESS_SDHC
bool "SDHC card over SPI"
select SPI
bool "SDHC card access"
select FLASH
help
File system on a SDHC card.

if DISK_ACCESS_SDHC

config DISK_ACCESS_SPI_SDHC
bool "SDHC access over SPI"
depends on SPI
help
File system on a SDHC card accessed over SPI.

@@ -107,4 +114,5 @@ config DISK_SDHC_VOLUME_NAME
help
Disk name as per file system naming guidelines.

endif # DISK_ACCESS_SDHC
endif # DISK_ACCESS

0 comments on commit c7e625f

Please sign in to comment.
You can’t perform that action at this time.