From 00ca54d8759bfdf8268548fa2446e1f9dcb1f56d Mon Sep 17 00:00:00 2001 From: dreamer Date: Sun, 2 Oct 2022 11:03:57 +0200 Subject: [PATCH 1/6] manually add midi handlers --- src/json2daisy/templates/daisy.h | 82 ++++++++++++++++---------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/src/json2daisy/templates/daisy.h b/src/json2daisy/templates/daisy.h index c4cf125..c844a72 100644 --- a/src/json2daisy/templates/daisy.h +++ b/src/json2daisy/templates/daisy.h @@ -24,7 +24,7 @@ struct Daisy{{ name|capitalize }} { /** Initializes the board according to the JSON board description * \param boost boosts the clock speed from 400 to 480 MHz */ - void Init(bool boost=true) + void Init(bool boost=true) { {% if som == 'seed' %} som.Configure(); @@ -32,89 +32,89 @@ struct Daisy{{ name|capitalize }} { {% else %} som.Init(); {% endif %} - {% if init != '' %} + {% if init != '' %} - {{init}} + {{init}} {% endif %} {% if i2c != '' %} // i2c - {{ i2c }} + {{ i2c }} {% endif %} - {% if PCA9685 != '' %} + {% if PCA9685 != '' %} // LED Drivers - {{ PCA9685 }} + {{ PCA9685 }} {% endif %} - {% if Switch != '' %} + {% if Switch != '' %} // Switches - {{ Switch }} + {{ Switch }} {% endif %} {% if Switch3 != '' %} // SPDT Switches - {{ Switch3 }} + {{ Switch3 }} {% endif %} - {% if CD4021 != '' %} + {% if CD4021 != '' %} // Muxes - {{ CD4021 }} + {{ CD4021 }} {% endif %} - {% if GateIn != '' %} + {% if GateIn != '' %} // Gate ins - {{ GateIn }} + {{ GateIn }} {% endif %} - {% if Encoder != '' %} + {% if Encoder != '' %} // Rotary encoders - {{ Encoder }} + {{ Encoder }} {% endif %} - {% if init_single != '' %} + {% if init_single != '' %} // Single channel ADC initialization - {{ init_single }} + {{ init_single }} {% endif %} {% if som == 'seed' %} {% if analogcount > 0 %} som.adc.Init(cfg, ANALOG_COUNT); {% endif %} {% endif %} - {% if ctrl_init != '' %} + {% if ctrl_init != '' %} // AnalogControl objects - {{ ctrl_init }} + {{ ctrl_init }} {% endif %} - {% if CD4051AnalogControl != '' %} + {% if CD4051AnalogControl != '' %} // Multiplexed AnlogControl objects - {{ CD4051AnalogControl }} + {{ CD4051AnalogControl }} {% endif %} - {% if Led != '' %} + {% if Led != '' %} // LEDs - {{ Led }} + {{ Led }} {% endif %} {% if RgbLed != '' %} - // RBG LEDs - {{ RgbLed }} + // RBG LEDs + {{ RgbLed }} {% endif %} - {% if GateOut != '' %} + {% if GateOut != '' %} // Gate outs - {{ GateOut }} + {{ GateOut }} {% endif %} {% if CVOuts != '' %} - // DAC - {{ CVOuts }} + // DAC + {{ CVOuts }} {% endif %} {% if display != '' %} // Display - {{ display }} + {{ display }} {% endif %} {% if MotorShield != '' %} @@ -239,7 +239,7 @@ struct Daisy{{ name|capitalize }} { cfg.samplerate = daisy::SaiHandle::Config::SampleRate::SAI_48KHZ; cfg.postgain = 0.5f; som.audio_handle.Init( - cfg, + cfg, sai_handle[0] {% for codec in external_codecs %} ,sai_handle[{{loop.index}}] @@ -255,12 +255,12 @@ struct Daisy{{ name|capitalize }} { } /** Handles all the controls processing that needs to occur at the block rate - * + * */ - void ProcessAllControls() + void ProcessAllControls() { - {% if process != '' %} - {{ process }} + {% if process != '' %} + {{ process }} {% endif %} {% if som != 'seed' %} som.ProcessAllControls(); @@ -268,7 +268,7 @@ struct Daisy{{ name|capitalize }} { } /** Handles all the maintenance processing. This should be run last within the audio callback. - * + * */ void PostProcess() { @@ -279,7 +279,7 @@ struct Daisy{{ name|capitalize }} { } /** Handles processing that shouldn't occur in the audio block, such as blocking transfers - * + * */ void LoopProcess() { @@ -289,7 +289,7 @@ struct Daisy{{ name|capitalize }} { /** Sets the audio sample rate * \param sample_rate the new sample rate in Hz */ - void SetAudioSampleRate(size_t sample_rate) + void SetAudioSampleRate(size_t sample_rate) { {% if som == 'seed' or som == 'petal_125b_sm' %} daisy::SaiHandle::Config::SampleRate enum_rate; @@ -313,13 +313,13 @@ struct Daisy{{ name|capitalize }} { /** Sets the audio block size * \param block_size the new block size in words */ - inline void SetAudioBlockSize(size_t block_size) + inline void SetAudioBlockSize(size_t block_size) { som.SetAudioBlockSize(block_size); } /** Starts up the audio callback process with the given callback - * + * */ inline void StartAudio(daisy::AudioHandle::AudioCallback cb) { @@ -335,6 +335,8 @@ struct Daisy{{ name|capitalize }} { // I/O Components {{comps}} {{dispdec}} + daisy::MidiUartHandler midi; + daisy::MidiUsbHandler midiusb; }; From 08dd48267c6e2938d9110237080f0293cf854be6 Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 6 Oct 2022 15:53:55 +0200 Subject: [PATCH 2/6] roughly adding midi --- src/json2daisy/json2daisy.py | 41 ++++++++++++++++++-------------- src/json2daisy/templates/daisy.h | 3 +-- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/json2daisy/json2daisy.py b/src/json2daisy/json2daisy.py index 92edb79..8e90bf9 100644 --- a/src/json2daisy/json2daisy.py +++ b/src/json2daisy/json2daisy.py @@ -19,7 +19,7 @@ def map_load(pair): # copy component defs into the def # TODO this should be recursive for object structures.. for k in component: - if not k in pair[1]: + if not k in pair[1]: pair[1][k] = component[k] else: raise Exception(f'unknown component "{pair[1]["component"]}"') @@ -47,7 +47,7 @@ def filter_has(set, key, key_exclude=None, match_exclude=None): # filter out the components we need, then map them onto the init for that part def filter_map_init(set, key, match, key_exclude=None, match_exclude=None): filtered = filter_match(set, key, match, key_exclude=key_exclude, match_exclude=match_exclude) - return "\n ".join(map(lambda x: x['map_init'].format_map(x), filtered)) + return "\n ".join(map(lambda x: x['map_init'].format_map(x), filtered)) def filter_map_set(set, key, match, key_exclude=None, match_exclude=None): filtered = filter_match(set, key, match, key_exclude=key_exclude, match_exclude=match_exclude) @@ -88,9 +88,9 @@ def flatten_index_dicts(comp): def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': """ - Generate a C++ Daisy board header from a dictionary board description. + Generate a C++ Daisy board header from a dictionary board description. - Returns a tuple containing the board + Returns a tuple containing the board header as a string and an information dictionary. The dictionary provides sufficient information to @@ -99,7 +99,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': """ target = board_description_dict - + # flesh out target components: components = target.get('components', {}) parents = target.get('parents', {}) @@ -143,7 +143,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': 'config': [], 'dim': [128, 64] } - + target['defines']['OOPSY_TARGET_HAS_OLED'] = 1 target['defines']['OOPSY_OLED_DISPLAY_WIDTH'] = target['display']['dim'][0] target['defines']['OOPSY_OLED_DISPLAY_HEIGHT'] = target['display']['dim'][1] @@ -168,7 +168,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': replacements['analogcount'] = len(list(filter_matches(components, 'component', ['AnalogControl', 'AnalogControlBipolar', 'CD4051'], key_exclude='default', match_exclude=True))) replacements['init_single'] = filter_map_ctrl(components, 'component', ['AnalogControl', 'AnalogControlBipolar', 'CD4051'], 'init_single', key_exclude='default', match_exclude=True) - replacements['ctrl_init'] = filter_map_ctrl(components, 'component', ['AnalogControl', 'AnalogControlBipolar'], 'map_init', key_exclude='default', match_exclude=True) + replacements['ctrl_init'] = filter_map_ctrl(components, 'component', ['AnalogControl', 'AnalogControlBipolar'], 'map_init', key_exclude='default', match_exclude=True) comp_string = pkg_resources.resource_string(__name__, json_defs_file) definitions_dict = json.loads(comp_string) @@ -176,7 +176,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': for name in definitions_dict: if name not in ('AnalogControl', 'AnalogControlBipolar', 'CD4051'): replacements[name] = filter_map_init(components, 'component', name, key_exclude='default', match_exclude=True) - + if 'display' in target: replacements['dispdec'] = f'daisy::OledDisplay<{target["display"]["driver"]}> display;' replacements['display'] = f""" @@ -190,6 +190,12 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': else: replacements['display'] = '' + if target['defines'].get('OOPSY_TARGET_HAS_MIDI_INPUT'): + replacements['midi'] = """ + daisy::MidiUartHandler midi; + daisy::MidiUsbHandler midiusb; + """ + replacements['process'] = filter_map_template(components, 'process', key_exclude='default', match_exclude=True) replacements['loopprocess'] = filter_map_template(components, 'loopprocess', key_exclude='default', match_exclude=True) @@ -207,7 +213,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': non_class_declarations = list(filter(lambda x: 'non_class_decl' in x, component_declarations)) if len(non_class_declarations) > 0: replacements['non_class_declarations'] = "\n".join(map(lambda x: x['non_class_decl'].format_map(x), non_class_declarations)) - + env_opts = {"trim_blocks": True, "lstrip_blocks": True} # Ideally, this would be what we use, but we'll need to get the jinja PackageLoader class working @@ -220,7 +226,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': header_env = jinja2.Environment(loader=jinja2.BaseLoader(), **env_opts).from_string(header_str.decode('utf-8')) rendered_header = header_env.render(replacements) - + # removing all unnecessary fields for comp in components: if 'map_init' in comp: @@ -231,7 +237,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': audio_info = target.get('audio', None) audio_channels = audio_info.get('channels', 2) if audio_info is not None else 2 - # This dictionary contains the necessary information to automatically (or manually) + # This dictionary contains the necessary information to automatically (or manually) # write code to interface with the generated board board_info = { 'name': target['name'], @@ -247,9 +253,9 @@ def generate_header_from_file(description_file: str) -> 'tuple[str, dict]': """ Generate a C++ Daisy board header from a JSON description file. - Returns a tuple containing the board + Returns a tuple containing the board header as a string and an information dictionary. - + The dictionary provides sufficient information to generate interface code, including component getters and setters, audio channel count, etc. @@ -257,7 +263,7 @@ def generate_header_from_file(description_file: str) -> 'tuple[str, dict]': with open(description_file, 'rb') as file: daisy_description = json.load(file) - + return generate_header(daisy_description) def generate_header_from_name(board_name: str) -> 'tuple[str, dict]': @@ -265,9 +271,9 @@ def generate_header_from_name(board_name: str) -> 'tuple[str, dict]': """ Generate a C++ Daisy board header for an existing daisy board. - Returns a tuple containing the board + Returns a tuple containing the board header as a string and an information dictionary. - + The dictionary provides sufficient information to generate interface code, including component getters and setters, audio channel count, etc. @@ -279,6 +285,5 @@ def generate_header_from_name(board_name: str) -> 'tuple[str, dict]': daisy_description = json.loads(daisy_description) except FileNotFoundError: raise FileNotFoundError(f'Unknown Daisy board "{board_name}"') - + return generate_header(daisy_description) - \ No newline at end of file diff --git a/src/json2daisy/templates/daisy.h b/src/json2daisy/templates/daisy.h index c844a72..1450176 100644 --- a/src/json2daisy/templates/daisy.h +++ b/src/json2daisy/templates/daisy.h @@ -335,8 +335,7 @@ struct Daisy{{ name|capitalize }} { // I/O Components {{comps}} {{dispdec}} - daisy::MidiUartHandler midi; - daisy::MidiUsbHandler midiusb; + {{midi}} }; From 894c940bc1c8b3b41f859283632eeda8d0808f5c Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 17 Aug 2023 09:04:01 +0200 Subject: [PATCH 3/6] undo trailing whitespace removal --- src/json2daisy/templates/daisy.h | 80 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/json2daisy/templates/daisy.h b/src/json2daisy/templates/daisy.h index 1450176..9951c54 100644 --- a/src/json2daisy/templates/daisy.h +++ b/src/json2daisy/templates/daisy.h @@ -24,7 +24,7 @@ struct Daisy{{ name|capitalize }} { /** Initializes the board according to the JSON board description * \param boost boosts the clock speed from 400 to 480 MHz */ - void Init(bool boost=true) + void Init(bool boost=true) { {% if som == 'seed' %} som.Configure(); @@ -32,89 +32,89 @@ struct Daisy{{ name|capitalize }} { {% else %} som.Init(); {% endif %} - {% if init != '' %} + {% if init != '' %} - {{init}} + {{init}} {% endif %} {% if i2c != '' %} // i2c - {{ i2c }} + {{ i2c }} {% endif %} - {% if PCA9685 != '' %} + {% if PCA9685 != '' %} // LED Drivers - {{ PCA9685 }} + {{ PCA9685 }} {% endif %} - {% if Switch != '' %} + {% if Switch != '' %} // Switches - {{ Switch }} + {{ Switch }} {% endif %} {% if Switch3 != '' %} // SPDT Switches - {{ Switch3 }} + {{ Switch3 }} {% endif %} - {% if CD4021 != '' %} + {% if CD4021 != '' %} // Muxes - {{ CD4021 }} + {{ CD4021 }} {% endif %} - {% if GateIn != '' %} + {% if GateIn != '' %} // Gate ins - {{ GateIn }} + {{ GateIn }} {% endif %} - {% if Encoder != '' %} + {% if Encoder != '' %} // Rotary encoders - {{ Encoder }} + {{ Encoder }} {% endif %} - {% if init_single != '' %} + {% if init_single != '' %} // Single channel ADC initialization - {{ init_single }} + {{ init_single }} {% endif %} {% if som == 'seed' %} {% if analogcount > 0 %} som.adc.Init(cfg, ANALOG_COUNT); {% endif %} {% endif %} - {% if ctrl_init != '' %} + {% if ctrl_init != '' %} // AnalogControl objects - {{ ctrl_init }} + {{ ctrl_init }} {% endif %} - {% if CD4051AnalogControl != '' %} + {% if CD4051AnalogControl != '' %} // Multiplexed AnlogControl objects - {{ CD4051AnalogControl }} + {{ CD4051AnalogControl }} {% endif %} - {% if Led != '' %} + {% if Led != '' %} // LEDs - {{ Led }} + {{ Led }} {% endif %} {% if RgbLed != '' %} - // RBG LEDs - {{ RgbLed }} + // RBG LEDs + {{ RgbLed }} {% endif %} - {% if GateOut != '' %} + {% if GateOut != '' %} // Gate outs - {{ GateOut }} + {{ GateOut }} {% endif %} {% if CVOuts != '' %} - // DAC - {{ CVOuts }} + // DAC + {{ CVOuts }} {% endif %} {% if display != '' %} // Display - {{ display }} + {{ display }} {% endif %} {% if MotorShield != '' %} @@ -239,7 +239,7 @@ struct Daisy{{ name|capitalize }} { cfg.samplerate = daisy::SaiHandle::Config::SampleRate::SAI_48KHZ; cfg.postgain = 0.5f; som.audio_handle.Init( - cfg, + cfg, sai_handle[0] {% for codec in external_codecs %} ,sai_handle[{{loop.index}}] @@ -255,12 +255,12 @@ struct Daisy{{ name|capitalize }} { } /** Handles all the controls processing that needs to occur at the block rate - * + * */ - void ProcessAllControls() + void ProcessAllControls() { - {% if process != '' %} - {{ process }} + {% if process != '' %} + {{ process }} {% endif %} {% if som != 'seed' %} som.ProcessAllControls(); @@ -268,7 +268,7 @@ struct Daisy{{ name|capitalize }} { } /** Handles all the maintenance processing. This should be run last within the audio callback. - * + * */ void PostProcess() { @@ -279,7 +279,7 @@ struct Daisy{{ name|capitalize }} { } /** Handles processing that shouldn't occur in the audio block, such as blocking transfers - * + * */ void LoopProcess() { @@ -289,7 +289,7 @@ struct Daisy{{ name|capitalize }} { /** Sets the audio sample rate * \param sample_rate the new sample rate in Hz */ - void SetAudioSampleRate(size_t sample_rate) + void SetAudioSampleRate(size_t sample_rate) { {% if som == 'seed' or som == 'petal_125b_sm' %} daisy::SaiHandle::Config::SampleRate enum_rate; @@ -313,13 +313,13 @@ struct Daisy{{ name|capitalize }} { /** Sets the audio block size * \param block_size the new block size in words */ - inline void SetAudioBlockSize(size_t block_size) + inline void SetAudioBlockSize(size_t block_size) { som.SetAudioBlockSize(block_size); } /** Starts up the audio callback process with the given callback - * + * */ inline void StartAudio(daisy::AudioHandle::AudioCallback cb) { From 5e5a698d85e539af46ae96aa1df4548f67cd65e5 Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 17 Aug 2023 09:16:00 +0200 Subject: [PATCH 4/6] fix tests --- src/json2daisy/json2daisy.py | 9 ++++----- tests/data/integration/expected_field.h | 2 ++ tests/data/integration/expected_patch.h | 2 ++ tests/data/integration/expected_patch_init.h | 1 + tests/data/integration/expected_petal.h | 1 + tests/data/integration/expected_petal_125b_sm.h | 1 + tests/data/integration/expected_pod.h | 2 ++ 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/json2daisy/json2daisy.py b/src/json2daisy/json2daisy.py index 8d91602..5195c90 100644 --- a/src/json2daisy/json2daisy.py +++ b/src/json2daisy/json2daisy.py @@ -253,11 +253,10 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': else: replacements['display'] = '' - if target['defines'].get('OOPSY_TARGET_HAS_MIDI_INPUT'): - replacements['midi'] = """ - daisy::MidiUartHandler midi; - daisy::MidiUsbHandler midiusb; - """ + if 'defines' in target: + if target['defines'].get('OOPSY_TARGET_HAS_MIDI_INPUT'): + replacements['midi'] = """daisy::MidiUartHandler midi; + daisy::MidiUsbHandler midiusb;""" replacements['process'] = filter_map_template( components, 'process', key_exclude='default', match_exclude=True) diff --git a/tests/data/integration/expected_field.h b/tests/data/integration/expected_field.h index 49de737..d443977 100644 --- a/tests/data/integration/expected_field.h +++ b/tests/data/integration/expected_field.h @@ -260,6 +260,8 @@ struct DaisyField { daisy::Switch sw2; daisy::I2CHandle i2c; daisy::OledDisplay display; + daisy::MidiUartHandler midi; + daisy::MidiUsbHandler midiusb; }; diff --git a/tests/data/integration/expected_patch.h b/tests/data/integration/expected_patch.h index b26f099..863b883 100644 --- a/tests/data/integration/expected_patch.h +++ b/tests/data/integration/expected_patch.h @@ -238,6 +238,8 @@ struct DaisyPatch { daisy::GateIn gatein2; dsy_gpio gateout; daisy::OledDisplay display; + daisy::MidiUartHandler midi; + daisy::MidiUsbHandler midiusb; }; diff --git a/tests/data/integration/expected_patch_init.h b/tests/data/integration/expected_patch_init.h index 378287b..97b5cd2 100644 --- a/tests/data/integration/expected_patch_init.h +++ b/tests/data/integration/expected_patch_init.h @@ -132,6 +132,7 @@ struct DaisyPatch_init { daisy::Switch sw1; daisy::Switch sw2; + }; diff --git a/tests/data/integration/expected_petal.h b/tests/data/integration/expected_petal.h index b635c3b..091caed 100644 --- a/tests/data/integration/expected_petal.h +++ b/tests/data/integration/expected_petal.h @@ -203,6 +203,7 @@ struct DaisyPetal { daisy::Switch sw7; daisy::I2CHandle i2c; + }; diff --git a/tests/data/integration/expected_petal_125b_sm.h b/tests/data/integration/expected_petal_125b_sm.h index b277ff7..38e9a7c 100644 --- a/tests/data/integration/expected_petal_125b_sm.h +++ b/tests/data/integration/expected_petal_125b_sm.h @@ -220,6 +220,7 @@ struct DaisyPetal_125b_sm { // I/O Components + }; diff --git a/tests/data/integration/expected_pod.h b/tests/data/integration/expected_pod.h index cba8f7d..69759ac 100644 --- a/tests/data/integration/expected_pod.h +++ b/tests/data/integration/expected_pod.h @@ -168,6 +168,8 @@ struct DaisyPod { daisy::Switch sw1; daisy::Switch sw2; daisy::OledDisplay display; + daisy::MidiUartHandler midi; + daisy::MidiUsbHandler midiusb; }; From 41a2f0313836136bbb7c6f9c4a8554ff781a4c5b Mon Sep 17 00:00:00 2001 From: dreamer Date: Fri, 25 Aug 2023 22:56:45 +0200 Subject: [PATCH 5/6] add midi info to board_info --- src/json2daisy/json2daisy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/json2daisy/json2daisy.py b/src/json2daisy/json2daisy.py index 5195c90..6866f6a 100644 --- a/src/json2daisy/json2daisy.py +++ b/src/json2daisy/json2daisy.py @@ -255,6 +255,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': if 'defines' in target: if target['defines'].get('OOPSY_TARGET_HAS_MIDI_INPUT'): + target['has_midi'] = True replacements['midi'] = """daisy::MidiUartHandler midi; daisy::MidiUsbHandler midiusb;""" @@ -321,7 +322,8 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': 'name': target['name'], 'components': components, 'aliases': target['aliases'], - 'channels': audio_channels + 'channels': audio_channels, + 'has_midi': target.get('has_midi', False) } return rendered_header, board_info From e6e817ef5a68d358725932d1f837bfa0e2ea2d0d Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 31 Aug 2023 07:45:35 +0200 Subject: [PATCH 6/6] remove MidiUsbHandler --- src/json2daisy/json2daisy.py | 3 +-- tests/data/integration/expected_field.h | 1 - tests/data/integration/expected_patch.h | 1 - tests/data/integration/expected_pod.h | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/json2daisy/json2daisy.py b/src/json2daisy/json2daisy.py index 6866f6a..131eb04 100644 --- a/src/json2daisy/json2daisy.py +++ b/src/json2daisy/json2daisy.py @@ -256,8 +256,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]': if 'defines' in target: if target['defines'].get('OOPSY_TARGET_HAS_MIDI_INPUT'): target['has_midi'] = True - replacements['midi'] = """daisy::MidiUartHandler midi; - daisy::MidiUsbHandler midiusb;""" + replacements['midi'] = """daisy::MidiUartHandler midi;""" replacements['process'] = filter_map_template( components, 'process', key_exclude='default', match_exclude=True) diff --git a/tests/data/integration/expected_field.h b/tests/data/integration/expected_field.h index d443977..63f50d5 100644 --- a/tests/data/integration/expected_field.h +++ b/tests/data/integration/expected_field.h @@ -261,7 +261,6 @@ struct DaisyField { daisy::I2CHandle i2c; daisy::OledDisplay display; daisy::MidiUartHandler midi; - daisy::MidiUsbHandler midiusb; }; diff --git a/tests/data/integration/expected_patch.h b/tests/data/integration/expected_patch.h index 863b883..3f02c8e 100644 --- a/tests/data/integration/expected_patch.h +++ b/tests/data/integration/expected_patch.h @@ -239,7 +239,6 @@ struct DaisyPatch { dsy_gpio gateout; daisy::OledDisplay display; daisy::MidiUartHandler midi; - daisy::MidiUsbHandler midiusb; }; diff --git a/tests/data/integration/expected_pod.h b/tests/data/integration/expected_pod.h index 69759ac..657b09a 100644 --- a/tests/data/integration/expected_pod.h +++ b/tests/data/integration/expected_pod.h @@ -169,7 +169,6 @@ struct DaisyPod { daisy::Switch sw2; daisy::OledDisplay display; daisy::MidiUartHandler midi; - daisy::MidiUsbHandler midiusb; };