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: Authenticators/DS28E15_22_25/DS28E15_22_25.h
- Revision:
- 82:c11090a32471
- Parent:
- 77:529edb329ee0
--- a/Authenticators/DS28E15_22_25/DS28E15_22_25.h Fri Jun 03 22:15:59 2016 +0000 +++ b/Authenticators/DS28E15_22_25/DS28E15_22_25.h Mon Jun 06 09:55:33 2016 -0500 @@ -292,11 +292,17 @@ /// Number of segments per page. static const unsigned int segmentsPerPage = (Page::length / Segment::length); + /// @{ /// Manufacturer ID - ManId manId; + ManId manId() const { return m_manId; } + void setManId(const ManId & manId) { m_manId = manId; } + /// @} + /// @{ /// Enable low voltage timing - bool lowVoltage; + bool lowVoltage() const { return m_lowVoltage; } + void setLowVoltage(bool lowVoltage) { m_lowVoltage = lowVoltage; } + /// @} /// @param owMaster 1-Wire Master to use for communication with DS28E15/22/25. /// @param lowVoltage Enable low voltage timing. @@ -435,9 +441,12 @@ bool continuing = false); private: + ManId m_manId; + bool m_lowVoltage; + static const unsigned int shaComputationDelayMs = 3; static const unsigned int eepromWriteDelayMs = 10; - unsigned int secretEepromWriteDelayMs() const { return (lowVoltage ? 200 : 100); } + unsigned int secretEepromWriteDelayMs() const { return (m_lowVoltage ? 200 : 100); } /// Read status bytes which are either personality or block protection. /// @note 1-Wire ROM selection should have already occurred.