forked from TheKikGen/USBMidiKliK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EEPROM_Params.h
34 lines (30 loc) · 1.03 KB
/
EEPROM_Params.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
#pragma once
// EEPROM parameters
// The signature is used to check if EEPROM is correctly initialized
// The parameters version is the version of the current structure.
// Changing the version will cause a new initialization in CheckEEPROM();.
// The following structure start at the first address of the EEPROM
#define EE_SIGNATURE "MDK"
#define EE_PRMVER 2
#define DEVICE_VENDORID_MIDI MIDI_DEVICE_VENDORID
#define DEVICE_PRODUCTID_MIDI MIDI_DEVICE_PRODUCTID
#define MIDI_PRODUCT_STRING_SIZE 30
// Boot modes
enum nextBootMode {
bootModeMidi = 0,
bootModeSerial = 1,
bootModeConfigMenu = 2,
};
typedef struct {
uint8_t signature[3];
uint8_t prmVer;
uint16_t buildNumber;
uint8_t nextBootMode;
uint16_t vendorID;
uint16_t productID;
struct {
USB_Descriptor_Header_t header;
uint16_t UnicodeString [MIDI_PRODUCT_STRING_SIZE+1];
} midiProductStringDescriptor ;
uint16_t midiChannelMap[16];
} EEPROM_Params_t;