Some tidying

This commit is contained in:
Russell Gallop
2011-08-10 16:16:15 +01:00
parent 6801d7a7c2
commit e6bc0b739e
2 changed files with 3 additions and 6 deletions

View File

@@ -51,7 +51,6 @@ INLINE void midi_get_ack_or_data(chanend c, int &is_ack, unsigned int &datum) {
} }
#endif #endif
INLINE void midi_send_ack(chanend c) { INLINE void midi_send_ack(chanend c) {
outct(c, MIDI_ACK); outct(c, MIDI_ACK);
outuchar(c, 0); outuchar(c, 0);
@@ -59,5 +58,4 @@ INLINE void midi_send_ack(chanend c) {
outuchar(c, 0); outuchar(c, 0);
} }
#endif // __usb_midi_h__ #endif // __usb_midi_h__

View File

@@ -85,7 +85,6 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
int wrptr = 0; int wrptr = 0;
unsigned rxPT, txPT; unsigned rxPT, txPT;
int midi_from_host_overflow = 0; int midi_from_host_overflow = 0;
int space_left;
//configure_clock_rate(clk_midi, 100, 1); //configure_clock_rate(clk_midi, 100, 1);
@@ -188,6 +187,7 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
outputted_symbol = outputting_symbol; outputted_symbol = outputting_symbol;
// have we got another symbol to send to uart? // have we got another symbol to send to uart?
if (rdptr != wrptr) { // FIFO not empty if (rdptr != wrptr) { // FIFO not empty
int space_left;
// Take from FIFO // Take from FIFO
outputting_symbol = symbol_fifo[rdptr]; outputting_symbol = symbol_fifo[rdptr];
symbol = makeSymbol(symbol_fifo[rdptr]); symbol = makeSymbol(symbol_fifo[rdptr]);
@@ -242,6 +242,7 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
int event; int event;
unsigned midi[3]; unsigned midi[3];
unsigned size; unsigned size;
int space_left;
// received data from host // received data from host
event = byterev(datum); event = byterev(datum);
mr_count++; mr_count++;
@@ -278,8 +279,7 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
if (space_left > 3) { if (space_left > 3) {
midi_send_ack(c_midi); midi_send_ack(c_midi);
} } else {
else {
midi_from_host_overflow = 1; midi_from_host_overflow = 1;
} }
@@ -306,7 +306,6 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
txPT += bit_time; txPT += bit_time;
outputting = 1; outputting = 1;
#endif #endif
} }
#endif #endif
} }