mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-25 12:09:56 +08:00
feat(mtd): add NOR FLASH support
This commit is contained in:
committed by
Alexander Lerach
parent
b5f69ac4e8
commit
6f1f7035a5
@@ -49,6 +49,7 @@ typedef struct {
|
||||
const px4_mtd_types_t type;
|
||||
const char *path;
|
||||
const uint32_t nblocks;
|
||||
const bool bypass_ftl;
|
||||
} px4_mtd_part_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__PX4_NUTTX)
|
||||
#include <nuttx/config.h>
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
MFT = 0,
|
||||
MTD = 1,
|
||||
@@ -49,9 +53,16 @@ typedef struct {
|
||||
I2C = 0,
|
||||
SPI = 1,
|
||||
ONCHIP = 2,
|
||||
FLEXSPI = 3
|
||||
FLEXSPI = 3,
|
||||
} bus_type;
|
||||
|
||||
enum px4_spi_driver {
|
||||
SPI_DRIVER_DEFAULT = 0, /* Ramtron (FRAM) */
|
||||
#if defined(CONFIG_MTD_MX25L)
|
||||
SPI_DRIVER_MX25L = 1, /* Macronix MX25L NOR flash */
|
||||
#endif
|
||||
} spi_driver;
|
||||
|
||||
uint32_t devid;
|
||||
} px4_mft_device_t;
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ typedef struct {
|
||||
int *partition_block_counts;
|
||||
int *partition_types;
|
||||
const char **partition_names;
|
||||
bool *partition_bypass_ftl;
|
||||
struct mtd_dev_s **part_dev;
|
||||
uint32_t devid;
|
||||
unsigned n_partitions_current;
|
||||
|
||||
Reference in New Issue
Block a user