pi-sd.h (373B)
1 #pragma once 2 3 #include <stdint.h> 4 5 #define NBYTES_PER_SECTOR 512 6 7 // initialize the PI SD driver 8 int pi_sd_init(void); 9 10 // read `nsec` sectors of the SD card starting at `lba` into a buffer 11 int pi_sd_read(void *data, uint32_t lba, uint32_t nsec); 12 13 // write `data` to `nsec` sectors of the SD card starting at `lba` 14 int pi_sd_write(void *data, uint32_t lba, uint32_t nsec);