libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
sdmmc.h
Go to the documentation of this file.
1
/*
2
TODO:
3
- Implement configuration (currently all settings are fixed).
4
*/
5
#pragma once
6
#ifndef DSY_SDMMC_H
7
#define DSY_SDMMC_H
9
#include <stdint.h>
10
#include "stm32h7xx_hal.h"
11
12
namespace
daisy
13
{
31
class
SdmmcHandler
32
{
33
public
:
35
enum class
Result
36
{
37
OK
,
38
ERROR
,
39
};
40
42
enum class
BusWidth
43
{
44
BITS_1
,
45
BITS_4
,
46
};
47
52
enum class
Speed
53
{
54
SLOW
,
55
MEDIUM_SLOW
,
56
STANDARD
,
57
FAST
,
58
VERY_FAST
,
59
};
60
61
struct
Config
62
{
63
Speed
speed
;
64
BusWidth
width
;
65
bool
66
clock_powersave
;
69
void
Defaults
()
70
{
71
speed
=
Speed::FAST
;
72
width
=
BusWidth::BITS_4
;
73
clock_powersave
=
false
;
74
}
75
};
76
77
SdmmcHandler
() {}
78
~SdmmcHandler
() {}
79
84
Result
Init
(
const
Config
&
cfg
);
85
86
private
:
87
};
89
}
// namespace daisy
90
91
#endif
daisy::LedDriverPca9685
Definition
leddriver.h:33
daisy::SdmmcHandler
Definition
sdmmc.h:32
daisy::SdmmcHandler::~SdmmcHandler
~SdmmcHandler()
Definition
sdmmc.h:78
daisy::SdmmcHandler::BusWidth
BusWidth
Definition
sdmmc.h:43
daisy::SdmmcHandler::BusWidth::BITS_1
@ BITS_1
daisy::SdmmcHandler::BusWidth::BITS_4
@ BITS_4
daisy::SdmmcHandler::Init
Result Init(const Config &cfg)
daisy::SdmmcHandler::Speed
Speed
Definition
sdmmc.h:53
daisy::SdmmcHandler::Speed::SLOW
@ SLOW
daisy::SdmmcHandler::Speed::STANDARD
@ STANDARD
daisy::SdmmcHandler::Speed::VERY_FAST
@ VERY_FAST
daisy::SdmmcHandler::Speed::FAST
@ FAST
daisy::SdmmcHandler::Speed::MEDIUM_SLOW
@ MEDIUM_SLOW
daisy::SdmmcHandler::SdmmcHandler
SdmmcHandler()
Definition
sdmmc.h:77
daisy::SdmmcHandler::Result
Result
Definition
sdmmc.h:36
daisy::SdmmcHandler::Result::ERROR
@ ERROR
daisy::SdmmcHandler::Result::OK
@ OK
daisy
Hardware defines and helpers for daisy field platform.
Definition
index.h:2
daisy::SdmmcHandler::Config
Definition
sdmmc.h:62
daisy::SdmmcHandler::Config::clock_powersave
bool clock_powersave
Definition
sdmmc.h:66
daisy::SdmmcHandler::Config::Defaults
void Defaults()
Definition
sdmmc.h:69
daisy::SdmmcHandler::Config::speed
Speed speed
Definition
sdmmc.h:63
daisy::SdmmcHandler::Config::width
BusWidth width
Definition
sdmmc.h:64
src
per
sdmmc.h