From f9357256249657af2374e3c334b9180e63dc5a30 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 16 Jun 2017 00:22:47 +0200 Subject: Split in different files --- floppyMusic/midi.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 floppyMusic/midi.c (limited to 'floppyMusic/midi.c') diff --git a/floppyMusic/midi.c b/floppyMusic/midi.c new file mode 100644 index 0000000..ff70a95 --- /dev/null +++ b/floppyMusic/midi.c @@ -0,0 +1,42 @@ +/* + * midi.c + * + * Created: 12.06.2017 20:43:47 + * Author: Jonas + */ + +#include "midi.h" + +void midi_setup() +{ + uart_init(9600); +} + +void midi_recieve(struct midi_command *_command) +{ + if(!(UCSRB & (1<> 4) & 0x0f; // Shift channel into first 4 bits; + note = data1; + velocity = data2; + + _command->command = command; + _command->channel=channel; + _command->note = note; + _command->velocity = velocity; + +} + +void midi_send(struct midi_command _command) +{ + +} \ No newline at end of file -- cgit v1.2.3