mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
Added non-blocking SPI DMA support for access to FLASH for BB
This commit is contained in:
parent
83a98f743c
commit
432b80167f
12 changed files with 341 additions and 265 deletions
|
@ -25,6 +25,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "drivers/bus.h"
|
||||
#include "drivers/dma.h"
|
||||
|
||||
struct flashVTable_s;
|
||||
|
||||
|
@ -64,11 +65,11 @@ typedef struct flashVTable_s {
|
|||
bool (*waitForReady)(flashDevice_t *fdevice);
|
||||
void (*eraseSector)(flashDevice_t *fdevice, uint32_t address);
|
||||
void (*eraseCompletely)(flashDevice_t *fdevice);
|
||||
void (*pageProgramBegin)(flashDevice_t *fdevice, uint32_t address);
|
||||
void (*pageProgramContinue)(flashDevice_t *fdevice, const uint8_t *data, int length);
|
||||
void (*pageProgramBegin)(flashDevice_t *fdevice, uint32_t address, void (*callback)(uint32_t length));
|
||||
uint32_t (*pageProgramContinue)(flashDevice_t *fdevice, uint8_t const **buffers, uint32_t *bufferSizes, uint32_t bufferCount);
|
||||
void (*pageProgramFinish)(flashDevice_t *fdevice);
|
||||
void (*pageProgram)(flashDevice_t *fdevice, uint32_t address, const uint8_t *data, int length);
|
||||
void (*pageProgram)(flashDevice_t *fdevice, uint32_t address, const uint8_t *data, uint32_t length, void (*callback)(uint32_t length));
|
||||
void (*flush)(flashDevice_t *fdevice);
|
||||
int (*readBytes)(flashDevice_t *fdevice, uint32_t address, uint8_t *buffer, int length);
|
||||
int (*readBytes)(flashDevice_t *fdevice, uint32_t address, uint8_t *buffer, uint32_t length);
|
||||
const flashGeometry_t *(*getGeometry)(flashDevice_t *fdevice);
|
||||
} flashVTable_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue