Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DeepCover Embedded Security in IoT MaximInterface MAXREFDES155#
Diff: Devices/DS2413.hpp
- Revision:
- 5:a8c83a2e6fa4
- Parent:
- 0:f77ad7f72d04
- Child:
- 6:471901a04573
diff -r caf56f265a13 -r a8c83a2e6fa4 Devices/DS2413.hpp
--- a/Devices/DS2413.hpp Fri Jan 19 10:25:02 2018 -0600
+++ b/Devices/DS2413.hpp Wed Jan 23 13:11:04 2019 -0600
@@ -36,6 +36,7 @@
#include <stdint.h>
#include <MaximInterface/Links/SelectRom.hpp>
#include <MaximInterface/Utilities/Export.h>
+#include <MaximInterface/Utilities/FlagSet.hpp>
namespace MaximInterface {
@@ -53,17 +54,19 @@
public:
enum ErrorValue { CommunicationError = 1 };
- struct Status {
- bool pioAInputState;
- bool pioAOutputState;
- bool pioBInputState;
- bool pioBOutputState;
+ enum StatusFlags {
+ PioAInputState = 0x1,
+ PioAOutputState = 0x2,
+ PioBInputState = 0x4,
+ PioBOutputState = 0x8
};
+ typedef FlagSet<StatusFlags, 4> Status;
DS2413(OneWireMaster & master, const SelectRom & selectRom)
: selectRom(selectRom), master(&master) {}
void setMaster(OneWireMaster & master) { this->master = &master; }
+
void setSelectRom(const SelectRom & selectRom) {
this->selectRom = selectRom;
}
@@ -89,6 +92,7 @@
/// Write the output logic state for only a single PIO pin.
MaximInterface_EXPORT error_code writePioAOutputState(DS2413 & ds2413,
bool pioAState);
+
MaximInterface_EXPORT error_code writePioBOutputState(DS2413 & ds2413,
bool pioBState);
/// @}