/* MIDI over the two UARTs: OUT KIT = UART0 TX (GP0), OUT SYNTH = UART1 TX (GP4), IN = UART0 RX (GP1). 31 250 baud, 8N1. */ #ifndef SEEDBOX_MIDI_UART_H #define SEEDBOX_MIDI_UART_H #include enum { MIDI_KIT = 0, MIDI_SYNTH = 1 }; void midi_init(void); void midi_send(int port, const uint8_t *bytes, int n); /* blocking */ void midi_note_on(int port, int ch, int note, int vel); /* ch 0..15 */ void midi_note_off(int port, int ch, int note); int midi_in_read(void); /* next byte from MIDI IN, or -1 */ #endif