drivers/eeprom/spi_xx25xx.c: Add configurable SPI eeprom frequency.

This commit is contained in:
Valmantas Paliksa 2019-03-20 06:54:08 -06:00 committed by Gregory Nutt
parent 5645cb5e51
commit b5018bd9db
2 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,11 @@ config EE25XX_SPIMODE
default 0 default 0
depends on SPI_EE_25XX depends on SPI_EE_25XX
config EE25XX_FREQUENCY
int "SPI EEPROM SCK frequency"
default 10000000
depends on SPI_EE_25XX
endif # SPI_EE_25XX endif # SPI_EE_25XX
config I2C_EE_24XX config I2C_EE_24XX

View File

@ -290,7 +290,7 @@ static void ee25xx_lock(FAR struct spi_dev_s *dev)
SPI_SETMODE(dev, CONFIG_EE25XX_SPIMODE); SPI_SETMODE(dev, CONFIG_EE25XX_SPIMODE);
SPI_SETBITS(dev, 8); SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0); (void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, 10000000); /* This is the default speed */ (void)SPI_SETFREQUENCY(dev, CONFIG_EE25XX_FREQUENCY);
} }
/**************************************************************************** /****************************************************************************