mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-07 22:22:21 -04:00
Remove SDCardStatusMessage, replace with Signal, extract to separate files.
This commit is contained in:
parent
600295f0db
commit
c70d95dcbe
7 changed files with 105 additions and 72 deletions
|
@ -22,26 +22,25 @@
|
|||
#ifndef __SD_CARD_H__
|
||||
#define __SD_CARD_H__
|
||||
|
||||
#include "ff.h"
|
||||
#include <cstdint>
|
||||
|
||||
#include "signal.hpp"
|
||||
|
||||
namespace sd_card {
|
||||
namespace filesystem {
|
||||
|
||||
namespace {
|
||||
enum class Status : int32_t {
|
||||
IOError = -3,
|
||||
MountError = -2,
|
||||
ConnectError = -1,
|
||||
NotPresent = 0,
|
||||
Present = 1,
|
||||
Mounted = 2,
|
||||
};
|
||||
|
||||
FATFS fs;
|
||||
extern Signal<Status> status_signal;
|
||||
|
||||
}
|
||||
void poll_inserted();
|
||||
|
||||
FRESULT mount() {
|
||||
return f_mount(&fs, "", 0);
|
||||
}
|
||||
|
||||
FRESULT unmount() {
|
||||
return f_mount(NULL, "", 0);
|
||||
}
|
||||
|
||||
} /* namespace filesystem */
|
||||
} /* namespace sd_card */
|
||||
|
||||
#endif/*__SD_CARD_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue