mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 17:53:33 +08:00
px4 mtd:Support FlexSPI attached Devices
This commit is contained in:
committed by
Daniel Agar
parent
35b9205b25
commit
51cda9edb0
@@ -49,6 +49,7 @@ typedef struct {
|
|||||||
I2C = 0,
|
I2C = 0,
|
||||||
SPI = 1,
|
SPI = 1,
|
||||||
ONCHIP = 2,
|
ONCHIP = 2,
|
||||||
|
FLEXSPI = 3
|
||||||
} bus_type;
|
} bus_type;
|
||||||
|
|
||||||
uint32_t devid;
|
uint32_t devid;
|
||||||
|
|||||||
@@ -82,4 +82,6 @@ int px4_at24c_initialize(FAR struct i2c_master_s *dev,
|
|||||||
|
|
||||||
void px4_at24c_deinitialize(void);
|
void px4_at24c_deinitialize(void);
|
||||||
|
|
||||||
|
int flexspi_attach(mtd_instance_s *instance);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|||||||
@@ -351,6 +351,11 @@ memoryout:
|
|||||||
|
|
||||||
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::SPI) {
|
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::SPI) {
|
||||||
rv = ramtron_attach(*instances[i]);
|
rv = ramtron_attach(*instances[i]);
|
||||||
|
#if defined(HAS_FLEXSPI)
|
||||||
|
|
||||||
|
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::FLEXSPI) {
|
||||||
|
rv = flexspi_attach(instances[i]);
|
||||||
|
#endif
|
||||||
|
|
||||||
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::ONCHIP) {
|
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::ONCHIP) {
|
||||||
instances[i]->n_partitions_current++;
|
instances[i]->n_partitions_current++;
|
||||||
|
|||||||
Reference in New Issue
Block a user