football_project_wo_output

Dependencies:   mbed

Fork of football_project by MZJ

Revision:
6:ef758ac3c928
Parent:
5:1b9734e68327
Child:
7:205ef63d311a
--- a/main.cpp	Fri Apr 17 04:20:07 2015 +0000
+++ b/main.cpp	Fri Apr 17 20:55:25 2015 +0000
@@ -58,11 +58,14 @@
 //  So we will make our own versions of Serial and SerialBase to (MySerial and MySerialBase)
 //  to not use serial_init() in serial_api.c, so flow control is setup correctly.
 //  MTSSerial now uses our MySerial instead of Serial.
-//  Since MTSSerial now uses hardware flow control by default, MTSSerialFlowControl isn't needed
-//  unless the hardware doesn't have hardware flow control capability or sw is always fast enough.
+//  Since MTSSerial now uses hardware flow control by default, but unfortunately we can't
+//  change the uart interrupt vector in the interrupt table, and the current low-level support
+//  in serial_api.c ignores non-tx/rx interrupts, so we'd need to rebuild the mbed lib. 
+// MTSSerialFlowControl uses "manual" (non-hardware-low-level) flow control based on its
+//  internal buffer--Rx servicing seems fast enough not to need hw flow control, so it's okay.
 //
-// mts::MTSSerialFlowControl pcfc( USBTX, USBRX, RTS_PIN_NUMBER, CTS_PIN_NUMBER, 1536, 1536 );
-mts::MTSSerial pcfc( USBTX, USBRX, 384, 2688 );
+mts::MTSSerialFlowControl pcfc( USBTX, USBRX, RTS_PIN_NUMBER, CTS_PIN_NUMBER, 384, 2688 );
+// mts::MTSSerial pcfc( USBTX, USBRX, 384, 2688 );
 
 uint8_t txPayload[TXRX_BUF_LEN] = { 0 };