electro-smith / libDaisy

Hardware Library for the Daisy Audio Platform
https://www.electro-smith.com/daisy
MIT License
314 stars 131 forks source link

UART MIDI - Allow configurations for unidirectional MIDI via single pin. #441

Open stephenhensley opened 2 years ago

stephenhensley commented 2 years ago

The existing MidiUartTransport requires both RX and TX to be valid peripherals.

We should add a config option for "direction" (values: in, out, both) and use that to configure the U(S)ART. Many applications only need MIDI input or MIDI output, and therefore only need to initialize a single pin.

Since the MidiUsbTransport moved to it's own file, might be worth moving the MidiUartTransport to it's own file as well just to keep everything clean.