File sdmmc.h¶
File List > external-docs > libDaisy > src > per > sdmmc.h
Go to the documentation of this file
Source Code¶
/*
TODO:
- Implement configuration (currently all settings are fixed).
*/
#pragma once
#ifndef DSY_SDMMC_H
#define DSY_SDMMC_H
#include <stdint.h>
#include "stm32h7xx_hal.h"
namespace daisy
{
class SdmmcHandler
{
public:
enum class Result
{
OK,
ERROR,
};
enum class BusWidth
{
BITS_1,
BITS_4,
};
enum class Speed
{
SLOW,
MEDIUM_SLOW,
STANDARD,
FAST,
VERY_FAST,
};
struct Config
{
Speed speed;
BusWidth width;
bool
clock_powersave;
void Defaults()
{
speed = Speed::FAST;
width = BusWidth::BITS_4;
clock_powersave = false;
}
};
SdmmcHandler() {}
~SdmmcHandler() {}
Result Init(const Config& cfg);
private:
};
} // namespace daisy
#endif