2019-01-27 14:25:11 -05:00
|
|
|
#ifndef SD_H
|
|
|
|
#define SD_H
|
|
|
|
|
|
|
|
#include <avr/io.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "device.h"
|
|
|
|
#include "util/time.h"
|
2019-01-29 10:41:27 -05:00
|
|
|
#include "hardware/UserIO.h"
|
2019-01-27 14:25:11 -05:00
|
|
|
#include "hardware/sdcard/ff.h"
|
|
|
|
|
2019-01-29 10:41:27 -05:00
|
|
|
#define SD_STATUS_READY 0x00
|
|
|
|
#define SD_STATUS_NOINIT 0x01
|
|
|
|
#define SD_STATUS_NODISK 0x02
|
|
|
|
#define SD_STATUS_WRITEPROTECTED 0x04
|
|
|
|
#define SD_STATUS_UNKNOWN 0xFF
|
|
|
|
|
2019-01-27 14:25:11 -05:00
|
|
|
void sd_init(void);
|
|
|
|
void sd_test(void);
|
2019-01-29 10:41:27 -05:00
|
|
|
void sd_scheduler(void);
|
|
|
|
void sd_jobs(void);
|
|
|
|
void sd_automount(void);
|
|
|
|
void sd_autounmount(void);
|
|
|
|
void sd_statuschange_indication(uint8_t pattern);
|
2019-01-27 14:25:11 -05:00
|
|
|
|
2019-02-07 07:16:42 -05:00
|
|
|
bool sd_mounted(void);
|
|
|
|
|
2019-01-27 14:25:11 -05:00
|
|
|
#endif
|