mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
drivers/mtd/at25ee: Multi-device SPI bus support
Adds a device ID to at25ee_initialize, which is stored in the at25ee_dev_s structure. This ID is used when calling SPI_SELECT. The implementation is based on the handling of the chip select in mtd/ramtron.c This change is NOT backward compatible: the function signature has changed Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
This commit is contained in:
committed by
Alan C. Assis
parent
34febea2df
commit
81550800d4
@@ -418,7 +418,7 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: at25xx_initialize
|
||||
* Name: at25ee_initialize
|
||||
*
|
||||
* Description:
|
||||
* Create an initialized MTD device instance for an AT25 SPI EEPROM
|
||||
@@ -428,6 +428,7 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev);
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev - a reference to the spi device structure
|
||||
* spi_devid - SPI device ID to manage CS lines in board
|
||||
* devtype - device type, from include/nuttx/eeprom/spi_xx25xx.h
|
||||
* readonly - sets block driver to be readonly
|
||||
*
|
||||
@@ -437,7 +438,8 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev);
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct mtd_dev_s *at25ee_initialize(FAR struct spi_dev_s *dev,
|
||||
int devtype, int readonly);
|
||||
uint16_t spi_devid, int devtype,
|
||||
int readonly);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: at24c_uninitialize
|
||||
|
||||
Reference in New Issue
Block a user