4D display working with Gecko board STK3600
Fork of 4dGENIE by
Diff: mbed_genie.cpp
- Revision:
- 5:3eb81723edc5
- Parent:
- 4:23c46eb6f0db
diff -r 23c46eb6f0db -r 3eb81723edc5 mbed_genie.cpp --- a/mbed_genie.cpp Sun Feb 23 18:01:55 2014 +0000 +++ b/mbed_genie.cpp Wed Jun 18 01:02:45 2014 +0000 @@ -7,6 +7,7 @@ Mbed4dGenie::Mbed4dGenie(PinName TxPin,PinName RxPin, PinName resetpin) : _screen(TxPin,RxPin) , _reset(resetpin) { //reset the 4d screen + _screen.baud(115200); _reset = 0; wait(0.25); _reset = 1; @@ -358,6 +359,8 @@ // help recover from errors. // void Mbed4dGenie::_handleError (void) { + _genieError = ERROR_NONE; + } @@ -424,6 +427,7 @@ default: // error, bad character, no other character // is acceptable in this state + pc.printf("error1\n\r"); return GENIE_EVENT_RXCHAR; } @@ -442,6 +446,7 @@ _geniePopLinkState(); _genieError = ERROR_NAK; _handleError(); + pc.printf("error2:NAK\n\r"); return GENIE_EVENT_RXCHAR; case GENIE_REPORT_EVENT: @@ -486,6 +491,7 @@ case GENIE_NAK: default: // error, bad character + pc.printf("error3\n\r"); return GENIE_EVENT_RXCHAR; // break; } @@ -530,6 +536,7 @@ } else { _genieError = ERROR_BAD_CS; _handleError(); + pc.printf("error4\n\r"); } } rxframe_count++;