diff options
Diffstat (limited to 'nuttx/drivers/mtd')
-rw-r--r-- | nuttx/drivers/mtd/Kconfig | 8 | ||||
-rw-r--r-- | nuttx/drivers/mtd/at25.c | 7 |
2 files changed, 6 insertions, 9 deletions
diff --git a/nuttx/drivers/mtd/Kconfig b/nuttx/drivers/mtd/Kconfig index a68fcaaeb..01d488cd6 100644 --- a/nuttx/drivers/mtd/Kconfig +++ b/nuttx/drivers/mtd/Kconfig @@ -101,14 +101,6 @@ config AT25_SPIFREQUENCY int "AT25 SPI Frequency" default 20000000 -config AT25_READONLY - bool "AT25 Read-Only FLASH" - default n - -config AT25_SECTOR512 - bool "Simulate 512 byte Erase Blocks" - default n - endif config MTD_AT45DB diff --git a/nuttx/drivers/mtd/at25.c b/nuttx/drivers/mtd/at25.c index 465ea4425..914c08c1b 100644 --- a/nuttx/drivers/mtd/at25.c +++ b/nuttx/drivers/mtd/at25.c @@ -57,11 +57,16 @@ /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ +/* Configuration ********************************************************************/ #ifndef CONFIG_AT25_SPIMODE # define CONFIG_AT25_SPIMODE SPIDEV_MODE0 #endif +#ifndef CONFIG_AT25_SPIFREQUENCY +# define CONFIG_AT25_SPIFREQUENCY 20000000 +#endif + /* AT25 Registers *******************************************************************/ /* Indentification register values */ @@ -180,7 +185,7 @@ static void at25_lock(FAR struct spi_dev_s *dev) SPI_SETMODE(dev, CONFIG_AT25_SPIMODE); SPI_SETBITS(dev, 8); - (void)SPI_SETFREQUENCY(dev, 20000000); + (void)SPI_SETFREQUENCY(dev, CONFIG_AT25_SPIFREQUENCY); } /************************************************************************************ |