mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 09:16:07 +03:00
DMA support for SD-card write
This commit is contained in:
parent
97ee6142a9
commit
a35ccd28de
4 changed files with 167 additions and 856 deletions
|
@ -243,13 +243,6 @@ typedef struct sdcard_metadata_t {
|
|||
uint32_t numBlocks; /* Card capacity in 512-byte blocks*/
|
||||
} sdcardMetadata_t;
|
||||
|
||||
typedef enum {
|
||||
SDCARD_NO_OPERATION,
|
||||
SDCARD_OPERATION_IN_PROGRESS,
|
||||
SDCARD_OPERATION_SUCCESS,
|
||||
SDCARD_OPERATION_ERROR,
|
||||
} sdcardOperationStatus_e;
|
||||
|
||||
typedef enum {
|
||||
SDCARD_BLOCK_OPERATION_READ,
|
||||
SDCARD_BLOCK_OPERATION_WRITE,
|
||||
|
@ -260,8 +253,8 @@ typedef void(*sdcard_operationCompleteCallback_c)(sdcardBlockOperation_e operati
|
|||
|
||||
bool sdcard_init();
|
||||
|
||||
bool sdcard_writeBlock(uint32_t blockIndex, uint8_t *buffer);
|
||||
bool sdcard_readBlock(uint32_t blockIndex, uint8_t *buffer, sdcard_operationCompleteCallback_c callback, uint32_t callbackData);
|
||||
bool sdcard_writeBlock(uint32_t blockIndex, uint8_t *buffer, sdcard_operationCompleteCallback_c callback, uint32_t callbackData);
|
||||
|
||||
void sdcard_poll();
|
||||
bool sdcard_isReady();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue