![Damien George](/assets/img/avatar_default.png)
If SD card is present on (soft) reset then it's mounted on 1:/ and files can be openned using, eg, open('1:/test.txt', 'r'), or 'w' for writing.
12 lines
370 B
C
12 lines
370 B
C
// this is a fixed size and should not be changed
|
|
#define SDCARD_BLOCK_SIZE (512)
|
|
|
|
void sdcard_init(void);
|
|
bool sdcard_is_present(void);
|
|
bool sdcard_power_on(void);
|
|
void sdcard_power_off(void);
|
|
bool sdcard_read_block(uint8_t *dest, uint32_t block_num);
|
|
bool sdcard_write_block(const uint8_t *src, uint32_t block_num);
|
|
|
|
extern const struct _mp_obj_base_t pyb_sdcard_obj;
|