-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathBoardSeed2DfmEvalEuro.h
executable file
·161 lines (106 loc) · 3.83 KB
/
BoardSeed2DfmEvalEuro.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*****************************************************************************
BoardSeed2DfmEvalEuro.h
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
#pragma once
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "erb/vcvrack/BoardGeneric.h"
#if defined (erb_USE_FATFS) && erb_USE_FATFS
#include "ff.h"
#include "ff_gen_drv.h"
#endif
namespace erb
{
class BoardSeed2DfmEvalEuro
: public BoardGeneric
{
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
public:
inline BoardSeed2DfmEvalEuro ();
inline virtual ~BoardSeed2DfmEvalEuro () override;
// Digital Inputs
inline const uint8_t &
gpi (size_t i) { return _digital_inputs [i]; }
// Analog Inputs
inline const float &
adc (size_t i) { return _analog_inputs [i]; }
// Audio Inputs
inline const Buffer &
audioin (size_t i) { return _audio_inputs [i]; }
// Digital Outputs
inline uint8_t &
gpo (size_t i) { return _digital_outputs [i]; }
// Analog Outputs
inline float & dac (size_t i) { return _analog_outputs [i]; }
// Audio Outputs
inline Buffer &
audioout (size_t i) { return _audio_outputs [i]; }
// Display
inline typename erb::FormatSsd130x <128, 64>::Storage &
oled () { return _oled; }
// SdMmc
#if defined (erb_USE_FATFS) && erb_USE_FATFS
inline FATFS & fatfs () { return _ff; }
inline bool set_sd (const char * path_0);
inline void reset_sd ();
#else
inline int fatfs () { return 0; }
#endif
/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
protected:
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
private:
#if defined (erb_USE_FATFS) && erb_USE_FATFS
static inline DSTATUS
ff_init (BYTE pdrv);
static inline DSTATUS
ff_status (BYTE pdrv);
static inline DRESULT
ff_read (BYTE pdrv, BYTE * buf, DWORD sector, UINT count);
#if _USE_WRITE == 1
static inline DRESULT
ff_write (BYTE pdrv, const BYTE * buf, DWORD sector, UINT count);
#endif
#if _USE_IOCTL == 1
static inline DRESULT
ff_ioctl (BYTE pdrv, BYTE cmd, void * buf);
#endif
#endif
erb::FormatSsd130x <128, 64>::Storage
_oled;
#if defined (erb_USE_FATFS) && erb_USE_FATFS
FATFS _ff;
char _ff_path [4];
inline static std::FILE *
_ff_file_ptr = nullptr;
inline static std::size_t
_ff_sector_cnt = 0;
static constexpr std::size_t
_ff_sector_size = 512;
const Diskio_drvTypeDef
_ff_driver = {
ff_init,
ff_status,
ff_read,
#if _USE_WRITE == 1
ff_write,
#endif
#if _USE_IOCTL == 1
ff_ioctl,
#endif
};
#endif
/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
private:
BoardSeed2DfmEvalEuro (const BoardSeed2DfmEvalEuro & rhs) = delete;
BoardSeed2DfmEvalEuro (BoardSeed2DfmEvalEuro && rhs) = delete;
BoardSeed2DfmEvalEuro &
operator = (const BoardSeed2DfmEvalEuro & rhs) = delete;
BoardSeed2DfmEvalEuro &
operator = (BoardSeed2DfmEvalEuro && rhs) = delete;
bool operator == (const BoardSeed2DfmEvalEuro & rhs) const = delete;
bool operator != (const BoardSeed2DfmEvalEuro & rhs) const = delete;
}; // class BoardSeed2DfmEvalEuro
} // namespace erb
#include "BoardSeed2DfmEvalEuro.hpp"
/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/