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.
Diff: Pushbutton.h
- Revision:
- 1:e47e80a32fb5
- Parent:
- 0:4482075b8b95
- Child:
- 4:3f905ce43f2b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Pushbutton.h Sun Feb 28 03:26:11 2021 +0000
@@ -0,0 +1,28 @@
+#ifndef Pushbutton_H
+#define Pushbutton_H
+//INCLUDES
+#include "mbed.h"
+#include "Defs_Sett.h"
+#include "PinAssignment.h"
+
+class Pushbutton{
+ public:
+ //Constructor
+ Pushbutton(PinName bt);
+ Pushbutton(PinName pin, int* state);
+
+ //Methods
+ int read();
+
+ private:
+ //Variables
+ DigitalIn button;
+ InterruptIn buttonInt;
+ static DigitalIn lastPressed;
+ int busy;
+ int *mode;
+
+ void updateMode();
+};
+
+#endif
\ No newline at end of file
