mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-24 15:27:41 +08:00
feat(mtd): allow bulk erase
This commit is contained in:
committed by
Alexander Lerach
parent
6f1f7035a5
commit
246484e91b
@@ -31,6 +31,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
@@ -55,6 +56,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
const px4_mft_device_t *device;
|
||||
const uint32_t npart;
|
||||
const bool bulk_erase;
|
||||
const px4_mtd_part_t partd[];
|
||||
} px4_mtd_entry_t;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
@@ -48,6 +49,7 @@ typedef struct {
|
||||
struct mtd_dev_s **part_dev;
|
||||
uint32_t devid;
|
||||
unsigned n_partitions_current;
|
||||
bool bulk_erase;
|
||||
} mtd_instance_s;
|
||||
|
||||
/*
|
||||
|
||||
@@ -346,6 +346,7 @@ memoryout:
|
||||
|
||||
uint32_t nparts = mtd_list->entries[num_entry]->npart;
|
||||
instances[i]->devid = mtd_list->entries[num_entry]->device->devid;
|
||||
instances[i]->bulk_erase = mtd_list->entries[num_entry]->bulk_erase;
|
||||
instances[i]->mtd_dev = nullptr;
|
||||
instances[i]->n_partitions_current = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user