forked from Archive/PX4-Autopilot
px4 mtd:Support FlexSPI attached Devices
This commit is contained in:
parent
416caf4f9a
commit
bdb6f51e8b
|
@ -49,6 +49,7 @@ typedef struct {
|
|||
I2C = 0,
|
||||
SPI = 1,
|
||||
ONCHIP = 2,
|
||||
FLEXSPI = 3
|
||||
} bus_type;
|
||||
|
||||
uint32_t devid;
|
||||
|
|
|
@ -82,4 +82,6 @@ int px4_at24c_initialize(FAR struct i2c_master_s *dev,
|
|||
|
||||
void px4_at24c_deinitialize(void);
|
||||
|
||||
weak_function int flexspi_attach(mtd_instance_s *instance);
|
||||
|
||||
__END_DECLS
|
||||
|
|
|
@ -352,6 +352,9 @@ memoryout:
|
|||
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::SPI) {
|
||||
rv = ramtron_attach(*instances[i]);
|
||||
|
||||
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::FLEXSPI) {
|
||||
rv = flexspi_attach(instances[i]);
|
||||
|
||||
} else if (mtd_list->entries[num_entry]->device->bus_type == px4_mft_device_t::ONCHIP) {
|
||||
instances[i]->n_partitions_current++;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue