![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fork to see if I can get working
Dependencies: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
Diff: xDotBridge/src/main.cpp
- Revision:
- 78:43f074baac34
- Parent:
- 77:176e3eb8f712
- Child:
- 81:1eb0f16b2ab9
--- a/xDotBridge/src/main.cpp Wed May 17 16:41:56 2017 -0600 +++ b/xDotBridge/src/main.cpp Mon Nov 13 09:50:49 2017 -0700 @@ -17,14 +17,18 @@ #define RX_SEQ_LOG 1 -const float BridgeVersion = 1.01; +const float BridgeVersion = 99.99; + +// 232 Pins +const PinName SER_TERM_TX = UART_TX; +const PinName SER_TERM_RX = UART_RX; #ifndef __TEST__ // Exclude code for tests Serial pc(USBTX, USBRX); //RawSerial outPc(UART_TX, UART_RX); //Serial *outPc; BufferedSerial *outPc; -InterruptIn uart1RxIntIn (UART_RX); +InterruptIn uart1RxIntIn (SER_TERM_RX); //// Serial interrupts / buffer code //const int buffer_size = 255; @@ -85,6 +89,11 @@ pairBtnIntFlag = true; } +void testFunc() { + const uint32_t test=0xDEADBEEF; + printf("%d", test); +} + int main() { CommProtocolPeerBrute *protocol = new CommProtocolPeerBrute(); BaseboardIO *bbio = new BaseboardIO(); @@ -208,6 +217,8 @@ while (true) { // myLogInfo("Start of loop time %d", us_ticker_read()); ledPatterns.turnOff(); + bbio->serialRx(true); // FIXME find a better home + bbio->serialTx(false); // FIXME only turn on during TX // Pair logic and switch sampling if (pairBtnIntFlag) { @@ -293,10 +304,11 @@ // Serial Terminal if (uartRxFlag) { + pc.printf("Got RX Int\r\n"); uart1RxIntIn.disable_irq(); // pc.printf("Got uart flag!!!\r\n"); uartRxFlag = false; - outPc = new BufferedSerial(UART1_TX, UART1_RX); + outPc = new BufferedSerial(SER_TERM_TX, SER_TERM_RX); outPc->baud(TERM_BAUD); serialTermMgr.regSerial(outPc); char c;