Im trying to reprogramm the 8u2 as generic MIDI device. I got as far as sending hard-coded MIDI-messages to my computer, but i cant catch the serial messages sent from my Arduino and change them to MIDI-messages.
As base file i took the Arduino-usbserial.c
I think my fault lies in taking the wrong variable as input from the atmega:
if(buffercnt == 2)
buffercnt = 0;
I thought, the function RingBuffer_Remove(&USARTtoUSB_Buffer) returns the byte read from the atmega, but i never get anything from it.