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.

Committer:
IanBenzMaxim
Date:
Fri Apr 08 16:11:16 2016 -0500
Revision:
49:36954b62f503
Parent:
25:bdb1c5a53b58
Added a Read Scratchpad operation for DS28E15/22/25. Added comments for various classes.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
IanBenzMaxim 25:bdb1c5a53b58 1 #ifndef _ONEWIRESLAVE_HPP
IanBenzMaxim 25:bdb1c5a53b58 2 #define _ONEWIRESLAVE_HPP
IanBenzMaxim 25:bdb1c5a53b58 3
IanBenzMaxim 25:bdb1c5a53b58 4 #include "RomId.hpp"
IanBenzMaxim 25:bdb1c5a53b58 5
IanBenzMaxim 49:36954b62f503 6 /// Base class for all 1-Wire Slaves.
IanBenzMaxim 25:bdb1c5a53b58 7 class OneWireSlave
IanBenzMaxim 25:bdb1c5a53b58 8 {
IanBenzMaxim 25:bdb1c5a53b58 9 public:
IanBenzMaxim 25:bdb1c5a53b58 10 enum CmdResult
IanBenzMaxim 25:bdb1c5a53b58 11 {
IanBenzMaxim 25:bdb1c5a53b58 12 Success,
IanBenzMaxim 25:bdb1c5a53b58 13 CommunicationError,
IanBenzMaxim 25:bdb1c5a53b58 14 TimeoutError,
IanBenzMaxim 25:bdb1c5a53b58 15 OperationFailure
IanBenzMaxim 25:bdb1c5a53b58 16 };
IanBenzMaxim 25:bdb1c5a53b58 17
IanBenzMaxim 49:36954b62f503 18 /// 1-Wire ROM ID for this slave device.
IanBenzMaxim 25:bdb1c5a53b58 19 RomId romId;
IanBenzMaxim 25:bdb1c5a53b58 20 };
IanBenzMaxim 25:bdb1c5a53b58 21
IanBenzMaxim 49:36954b62f503 22 #endif