mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
17 lines
358 B
C
17 lines
358 B
C
#include "diskio.h"
|
|
|
|
#include "ch.h"
|
|
#include "hal.h"
|
|
|
|
uint32_t get_capacity(void) {
|
|
return mmcsdGetCardCapacity(&SDCD1);
|
|
}
|
|
|
|
bool_t read_block(uint32_t startblk, uint8_t *buf, uint32_t n) {
|
|
return sdcRead(&SDCD1, startblk, buf, n);
|
|
}
|
|
|
|
bool_t write_block(uint32_t startblk, uint8_t *buf, uint32_t n) {
|
|
return sdcWrite(&SDCD1, startblk, buf, n);
|
|
}
|