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/DS248x/ds248x.h
- Revision:
- 71:562f5c702094
- Parent:
- 69:f915c4c59a69
- Child:
- 72:6892702709ee
diff -r 7db8ff74bcbe -r 562f5c702094 OneWire_Masters/DS248x/ds248x.h --- a/OneWire_Masters/DS248x/ds248x.h Mon May 09 08:31:53 2016 -0500 +++ b/OneWire_Masters/DS248x/ds248x.h Mon May 09 15:04:23 2016 -0500 @@ -80,41 +80,41 @@ class Config { public: - /// @{ - /// 1-Wire Speed - bool c1WS() const { return m_c1WS; } - void setC1WS(bool c1WS) { m_c1WS = c1WS; } - /// @} + /// @{ + /// 1-Wire Speed + bool get1WS() const { return m_1WS; } + void set1WS(bool new1WS) { m_1WS = new1WS; } + /// @} - /// @{ - /// Strong Pullup - bool cSPU() const { return m_cSPU; } - void setCSPU(bool cSPU) { m_cSPU = cSPU; } - /// @} + /// @{ + /// Strong Pullup + bool getSPU() const { return m_SPU; } + void setSPU(bool newSPU) { m_SPU = newSPU; } + /// @} - /// @{ - /// 1-Wire Power Down - bool cPDN() const { return m_cPDN; } - void setCPDN(bool cPDN) { m_cPDN = cPDN; } - /// @} + /// @{ + /// 1-Wire Power Down + bool getPDN() const { return m_PDN; } + void setPDN(bool newPDN) { m_PDN = newPDN; } + /// @} - /// @{ - /// Active Pullup - bool cAPU() const { return m_cAPU; } - void setCAPU(bool cAPU) { m_cAPU = cAPU; } - /// @} + /// @{ + /// Active Pullup + bool getAPU() const { return m_APU; } + void setAPU(bool newAPU) { m_APU = newAPU; } + /// @} - /// Byte representation that is read from the DS2465. - std::uint8_t readByte() const; - /// Byte respresentation that is written to the DS2465. - std::uint8_t writeByte() const; + /// Byte representation that is read from the DS2465. + std::uint8_t readByte() const; + /// Byte respresentation that is written to the DS2465. + std::uint8_t writeByte() const; - /// Reset to the power-on default config. - void reset(); - Config() { reset(); } + /// Reset to the power-on default config. + void reset(); + Config() { reset(); } private: - bool m_c1WS, m_cSPU, m_cPDN, m_cAPU; + bool m_1WS, m_SPU, m_PDN, m_APU; }; /**********************************************************//** @@ -270,10 +270,6 @@ virtual OneWireMaster::CmdResult OWReadByte(uint8_t & recvbyte, OWLevel after_level); virtual OneWireMaster::CmdResult OWWriteByte(uint8_t sendbyte, OWLevel after_level); - - virtual OneWireMaster::CmdResult OWWriteBlock(const uint8_t *tran_buf, uint8_t tran_len); - - virtual OneWireMaster::CmdResult OWReadBlock(uint8_t *rx_buf, uint8_t rx_len); virtual OneWireMaster::CmdResult OWSetSpeed(OWSpeed new_speed);