Deluge Firmware
1.3.0
Build date: 2026.08.29
Toggle main menu visibility
Loading...
Searching...
No Matches
smsysex.h
1
#include "definitions_cxx.hpp"
2
#include "io/midi/midi_device_manager.h"
3
#include "storage/storage_manager.h"
4
5
struct
FILdata
;
6
7
namespace
smSysex {
8
9
const
uint32_t MAX_PATH_NAME_LEN = 255;
10
11
// Helper structure for file operation parameters
12
struct
FileOpParams
{
13
String
fromName;
14
String
toName;
15
uint32_t date = 0;
16
uint32_t time = 0;
17
18
const
char
* getFromPath()
const
{
return
fromName.get(); }
19
const
char
* getToPath()
const
{
return
toName.get(); }
20
const
TCHAR* getFromTC()
const
{
return
(
const
TCHAR*)fromName.get(); }
21
const
TCHAR* getToTC()
const
{
return
(
const
TCHAR*)toName.get(); }
22
bool
hasTimestamp()
const
{
return
date != 0 || time != 0; }
23
};
24
25
FILdata
* openFIL(
const
char
* fPath,
int
forWrite, uint32_t* fsize, FRESULT* eCode);
26
FRESULT closeFIL(
FILdata
* fd);
27
FILdata
* findEmptyFIL();
28
29
void
noteSessionIdUse(uint8_t msgId);
30
void
noteFileIdUse(
FILdata
* fp);
31
FILdata
* entryForFID(uint32_t fileId);
32
void
startDirect(
JsonSerializer
& writer);
33
void
startReply(
JsonSerializer
& writer,
JsonDeserializer
& reader);
34
void
sendMsg(
MIDICable
& device,
JsonSerializer
& writer);
35
36
void
sysexReceived(
MIDICable
& cable, uint8_t* data, int32_t len);
37
void
handleNextSysEx();
38
void
openFile(
MIDICable
& cable,
JsonDeserializer
& reader);
39
void
closeFile(
MIDICable
& cable,
JsonDeserializer
& reader);
40
void
readBlock(
MIDICable
& cable,
JsonDeserializer
& reader);
41
void
writeBlock(
MIDICable
& cable,
JsonDeserializer
& reader);
42
void
getDirEntries(
MIDICable
& cable,
JsonDeserializer
& reader);
43
void
deleteFile(
MIDICable
& cable,
JsonDeserializer
& reader);
44
void
createDirectory(
MIDICable
& cable,
JsonDeserializer
& reader);
45
FRESULT createPathDirectories(
String
& path, uint32_t date, uint32_t time);
46
void
rename(
MIDICable
& cable,
JsonDeserializer
& reader);
47
void
updateTime(
MIDICable
& cable,
JsonDeserializer
& reader);
48
void
copyFile(
MIDICable
& cable,
JsonDeserializer
& reader);
49
void
moveFile(
MIDICable
& cable,
JsonDeserializer
& reader);
50
void
assignSession(
MIDICable
& cable,
JsonDeserializer
& reader);
51
void
doPing(
MIDICable
& cable,
JsonDeserializer
& reader);
52
uint32_t decodeDataFromReader(
JsonDeserializer
& reader, uint8_t* dest, uint32_t destMax);
53
54
// Helper functions for file operations
55
bool
parseFileOpParams(
JsonDeserializer
& reader,
FileOpParams
&
params
);
56
FRESULT performFileCopy(
const
FileOpParams
&
params
);
57
void
setFileTimestamp(
const
TCHAR* path, uint32_t date, uint32_t time);
58
59
}
// namespace smSysex
JsonDeserializer
Definition
storage_manager.h:305
JsonSerializer
Definition
storage_manager.h:273
MIDICable
A MIDI cable connection. Stores all state specific to a given cable and its contained ports and chann...
Definition
midi_device.h:96
String
Definition
d_string.h:41
deluge::modulation::params
Definition
param.cpp:28
FILdata
Definition
smsysex.cpp:37
smSysex::FileOpParams
Definition
smsysex.h:12