More consistent naming

This commit is contained in:
Russell Gallop
2011-08-12 11:34:39 +01:00
parent b1656cb2db
commit 3d7a88b1fc

View File

@@ -60,7 +60,7 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
unsigned cable_number) { unsigned cable_number) {
unsigned symbol = 0x0; // Symbol in progress of being sent out unsigned symbol = 0x0; // Symbol in progress of being sent out
unsigned outputting = 0; // Guard when outputting data unsigned outputting = 0; // Guard when outputting data
unsigned time; // Timer value used for outputting unsigned txT; // Timer value used for outputting
//unsigned inputPortState, newInputPortState; //unsigned inputPortState, newInputPortState;
int waiting_for_ack = 0; int waiting_for_ack = 0;
// Receiver // Receiver
@@ -99,7 +99,7 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
reset_midi_state(mips); reset_midi_state(mips);
t :> time; t :> txT;
t2 :> rxT; t2 :> rxT;
#ifndef MIDI_LOOPBACK #ifndef MIDI_LOOPBACK
@@ -175,7 +175,7 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
// If outputting then feed the bits out one at a time // If outputting then feed the bits out one at a time
// until symbol is zero expect pattern like 10'b1dddddddd0 // until symbol is zero expect pattern like 10'b1dddddddd0
// This code will leave the output high afterwards due to the stop bit added with makeSymbol // This code will leave the output high afterwards due to the stop bit added with makeSymbol
case outputting => t when timerafter(time) :> int _: case outputting => t when timerafter(txT) :> int _:
if (symbol == 0) { if (symbol == 0) {
uout_count++; uout_count++;
outputted_symbol = outputting_symbol; outputted_symbol = outputting_symbol;
@@ -192,13 +192,13 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
p_midi_out <: 1 @ txPT; p_midi_out <: 1 @ txPT;
// printstr("mout1\n"); // printstr("mout1\n");
t :> time; t :> txT;
time += bit_time; txT += bit_time;
txPT += bit_time; txPT += bit_time;
} else } else
outputting = 0; outputting = 0;
} else { } else {
time += bit_time; txT += bit_time;
txPT += bit_time; txPT += bit_time;
p_midi_out @ txPT <: (symbol & 1); p_midi_out @ txPT <: (symbol & 1);
// printstr("mout2\n"); // printstr("mout2\n");
@@ -267,8 +267,8 @@ void usb_midi(in port ?p_midi_in, out port ?p_midi_out,
#else #else
// Start sending byte (to be continued by outputting case) // Start sending byte (to be continued by outputting case)
p_midi_out <: 1 @ txPT; p_midi_out <: 1 @ txPT;
t :> time; t :> txT;
time += bit_time; txT += bit_time;
txPT += bit_time; txPT += bit_time;
outputting = 1; outputting = 1;
#endif #endif