Implementation of 1-Wire with added Alarm Search Functionality
Dependents: Max32630_One_Wire_Interface
Diff: Authenticators/DS28E15_22_25/DS28E15_22_25.h
- Revision:
- 82:c11090a32471
- Parent:
- 77:529edb329ee0
diff -r e2a3ad98874e -r c11090a32471 Authenticators/DS28E15_22_25/DS28E15_22_25.h --- 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.