drivers/eeprom/spi_xx25xx.c: Add configurable SPI eeprom frequency.
This commit is contained in:
parent
5645cb5e51
commit
b5018bd9db
|
@ -19,6 +19,11 @@ config EE25XX_SPIMODE
|
|||
default 0
|
||||
depends on SPI_EE_25XX
|
||||
|
||||
config EE25XX_FREQUENCY
|
||||
int "SPI EEPROM SCK frequency"
|
||||
default 10000000
|
||||
depends on SPI_EE_25XX
|
||||
|
||||
endif # SPI_EE_25XX
|
||||
|
||||
config I2C_EE_24XX
|
||||
|
|
|
@ -290,7 +290,7 @@ static void ee25xx_lock(FAR struct spi_dev_s *dev)
|
|||
SPI_SETMODE(dev, CONFIG_EE25XX_SPIMODE);
|
||||
SPI_SETBITS(dev, 8);
|
||||
(void)SPI_HWFEATURES(dev, 0);
|
||||
(void)SPI_SETFREQUENCY(dev, 10000000); /* This is the default speed */
|
||||
(void)SPI_SETFREQUENCY(dev, CONFIG_EE25XX_FREQUENCY);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
Loading…
Reference in New Issue