1-Wire® library for mbed. Complete 1-Wire library that supports our silicon masters along with a bit-bang master on the MAX32600MBED platform with one common interface for mbed. Slave support has also been included and more slaves will be added as time permits.
Dependents: MAXREFDES131_Qt_Demo MAX32630FTHR_iButton_uSD_Logger MAX32630FTHR_DS18B20_uSD_Logger MAXREFDES130_131_Demo ... more
Superseded by MaximInterface.
Diff: OneWire_Masters/DS2480B/ds2480b.cpp
- Revision:
- 71:562f5c702094
- Parent:
- 67:76776130aec9
- Child:
- 72:6892702709ee
diff -r 7db8ff74bcbe -r 562f5c702094 OneWire_Masters/DS2480B/ds2480b.cpp --- a/OneWire_Masters/DS2480B/ds2480b.cpp Mon May 09 08:31:53 2016 -0500 +++ b/OneWire_Masters/DS2480B/ds2480b.cpp Mon May 09 15:04:23 2016 -0500 @@ -490,38 +490,6 @@ //********************************************************************* -OneWireMaster::CmdResult Ds2480b::OWWriteBlock(const uint8_t *tran_buf, uint8_t tran_len) -{ - OneWireMaster::CmdResult result; - uint8_t idx = 0; - - do - { - result = OWWriteByte(tran_buf[idx++], OneWireMaster::LEVEL_NORMAL); - } - while((result == OneWireMaster::Success) && (idx < tran_len)); - - return result; -} - - -//********************************************************************* -OneWireMaster::CmdResult Ds2480b::OWReadBlock(uint8_t *rx_buf, uint8_t rx_len) -{ - OneWireMaster::CmdResult result; - uint8_t idx = 0; - - do - { - result = OWReadByte(rx_buf[idx++], OneWireMaster::LEVEL_NORMAL); - } - while((result == OneWireMaster::Success) && (idx < rx_len)); - - return result; -} - - -//********************************************************************* OneWireMaster::CmdResult Ds2480b::OWSetSpeed(OWSpeed new_speed) { OneWireMaster::CmdResult result = OneWireMaster::OperationFailure; @@ -1016,4 +984,4 @@ { return ((buf[nbyt] >> nbit) & 0x01); } -} \ No newline at end of file +}