mbed code for MAXREFDES131 Qt GUI demo
Dependencies: OWGridEye OneWire mbed
Diff: main.cpp
- Revision:
- 3:f2194ecf91f5
- Parent:
- 1:2ad0ae1416d2
--- a/main.cpp Fri Aug 12 19:02:09 2016 +0000 +++ b/main.cpp Mon Sep 26 21:37:56 2016 +0000 @@ -107,34 +107,9 @@ comms.baud(115200); comms.attach(&rx_callback, SerialBase::RxIrq); - #if defined(I2C_TO_OW_MASTER) - //Instantiates a 1-wire master using the given I2C bus SDA/SCL pins - //Requires a DS248X series of masters on I2C bus - //https://para.maximintegrated.com/en/results.mvp?fam=1wire&tree=master - - I2C i2cBus(D14, D15); - i2cBus.frequency(400000); - DS2484 owm(i2cBus); - - #elif defined(SERIAL_TO_OW_MASTER) - //Instantiates a 1-wire master using the given UART tx/rx pins - //This master hasn't been implemented yet 17MAR16, happy St. Patricks day. - //Requires a DS2480B serial to 1-wire master - //https://www.maximintegrated.com/en/products/interface/controllers-expanders/DS2480B.html - - Serial owUart(D1, D0); - DS2480B owm(owUart); - - #elif defined(BIT_BANG_MASTER) - //Instantiates a 1-wire master on the given GPIO pin - //Requires MAX32600MBED platform - //https://www.maximintegrated.com/en/products/digital/microcontrollers/MAX32600MBED.html - - OwGpio owm(D2); - - #else - #error One Wire Master Not Defined - #endif + I2C i2cBus(D14, D15); + i2cBus.frequency(400000); + DS2484 owm(i2cBus); OneWireMaster::CmdResult ow_result; MultidropRomIterator selector(owm);