px4_mtd: update eeprom at24c driver to initialize multiple instances

This commit is contained in:
Igor Mišić
2021-12-20 13:40:52 +01:00
committed by Beat Küng
parent efde738826
commit 08a9e49f3e
5 changed files with 32 additions and 19 deletions
@@ -82,6 +82,10 @@
#define BOARD_NUM_SPI_CFG_HW_VERSIONS 1
#endif
#ifndef BOARD_MTD_NUM_EEPROM
#define BOARD_MTD_NUM_EEPROM 1
#endif
/* ADC defining tools
* We want to normalize the V5 Sensing to V = (adc_dn) * ADC_V5_V_FULL_SCALE/(2 ^ ADC_BITS) * ADC_V5_SCALE)
*/
@@ -75,7 +75,8 @@ __EXPORT int px4_mtd_get_geometry(const mtd_instance_s *instance, unsigned long
*/
__EXPORT ssize_t px4_mtd_get_partition_size(const mtd_instance_s *instance, const char *partname);
FAR struct mtd_dev_s *px4_at24c_initialize(FAR struct i2c_master_s *dev,
uint8_t address);
int px4_at24c_initialize(FAR struct i2c_master_s *dev,
uint8_t address, FAR struct mtd_dev_s **mtd_dev);
__END_DECLS