diff options
author | Duncan Wilkie <antigravityd@gmail.com> | 2023-08-07 17:29:29 -0500 |
---|---|---|
committer | Duncan Wilkie <antigravityd@gmail.com> | 2023-08-07 17:29:29 -0500 |
commit | 2a3940d8a36433485a6ef489d5123cd491618b50 (patch) | |
tree | 75354e5dc5f81535339895d6d08c4969be78f157 /controller/inc | |
parent | 6380915e6e8d98e2c933ea6eb8df02fb1b123b97 (diff) |
slave progress and WCET
Diffstat (limited to 'controller/inc')
-rw-r--r-- | controller/inc/base_midi.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/controller/inc/base_midi.h b/controller/inc/base_midi.h index 8320803..b6e5b19 100644 --- a/controller/inc/base_midi.h +++ b/controller/inc/base_midi.h @@ -8,7 +8,8 @@ // Configuration. #define DEBUG 0 // If defined, enable input safety checking (e.g. too large data bytes, bad ID numbers, etc). // These checks have some performance downside. -#define RUNNING_STATUS 0 // If defined, the MIDI instrument stores a transmit status and uses running statuses whenever possible. +/* #define RUNNING_STATUS 0 // If defined, the MIDI instrument stores a transmit status and uses running statuses whenever possible .*/ + #define KEY_ON_VELOCITY 0 // If defined, the MIDI instrument sends velocities with Note On messages. #undef RELEASE_VELOCITY // If defined, the MIDI instrument sends Note Off messages with velocities. // Otherwise, sends Note On velocity 0 or Note Off velocity 0 according to ACTUAL_OFF_MESSAGE. @@ -69,7 +70,17 @@ typedef struct { bool (*unimplemented_universal_sysex_collector)(uint8_t); // Same as above. Parsing ends with end_of_sysex_handler. } ConsumerBehavior; -extern ConsumerBehavior pfns; // Initialize this globally in your main. +typedef struct { + uint8_t status; + bool first_byte; + uint8_t byte0; + bool send_eox; + uint8_t *stack; + size_t top; + size_t size; +} ParserMemory; + +void midi_init(ConsumerBehavior new_pfns); // System exclusive sends. void sysex(uint16_t manufacturer_id, uint8_t* contents, size_t contents_len); |