aboutsummaryrefslogtreecommitdiff
path: root/examples/Blink3rdPartyLib/Toggle/TogglePin.h
diff options
context:
space:
mode:
authorPieter du Preez <pdupreez@gmail.com>2018-10-02 23:00:14 +0200
committerPieter du Preez <pdupreez@gmail.com>2018-10-02 23:00:14 +0200
commita285810cb53bf454aa6133cbb589bcd3559c0e5d (patch)
tree75195d15acebcf296bb675e6f9b688e0cd3895c1 /examples/Blink3rdPartyLib/Toggle/TogglePin.h
parentd4d3d3d6c354db1e2989d8dd671f8af96cc036d8 (diff)
Added a test case for moving CORE_LIB in PR #583.
This patch is meant to test the link order, if the OTHER_OBJS variable gets used to add 3rd party archives, that depend on the Arduino core lib (the archive pointed to by the CORE_LIB variable). The examples/Blink3rdPartyLib directory contains a stripped down Blink and includes a library in the examples/Blink3rdPartyLib/Toggle sub-directory. The archive, built inside the Toggle directory mimics a 3rd party library. The archive gets built and linked in by using the OTHER_OBS variable in examples/Blink3rdPartyLib/Makefile.
Diffstat (limited to 'examples/Blink3rdPartyLib/Toggle/TogglePin.h')
-rw-r--r--examples/Blink3rdPartyLib/Toggle/TogglePin.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/Blink3rdPartyLib/Toggle/TogglePin.h b/examples/Blink3rdPartyLib/Toggle/TogglePin.h
new file mode 100644
index 0000000..5a7e32c
--- /dev/null
+++ b/examples/Blink3rdPartyLib/Toggle/TogglePin.h
@@ -0,0 +1,19 @@
+// This program is free software and is licensed under the same conditions as
+// describe in https://github.com/sudar/Arduino-Makefile/blob/master/licence.txt
+
+#ifndef TOGGLEPIN_H_
+#define TOGGLEPIN_H_
+
+class TogglePin
+{
+ public:
+ TogglePin(int pinNumber, bool state);
+
+ bool toggle();
+
+ private:
+ const int _pinNumber;
+ bool _state;
+};
+
+#endif