Example of bearbones class

Dependents:   ExampleCLasses

Files at this revision

API Documentation at this revision

Comitter:
zer044
Date:
Tue Sep 26 08:43:25 2017 +0000
Commit message:
Initial Commit

Changed in this revision

AClassy.cpp Show annotated file Show diff for this revision Revisions of this file
AClassy.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AClassy.cpp	Tue Sep 26 08:43:25 2017 +0000
@@ -0,0 +1,16 @@
+#include "AClassy.h"
+
+ClassyClass::ClassyClass()
+{
+//Constructor does nothing atm
+}
+
+ClassyClass::~ClassyClass()
+{
+//Destructor does nothing atm
+}
+
+void ClassyClass::setLEDstate(int state)
+{
+     ledy2.write(state);    
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AClassy.h	Tue Sep 26 08:43:25 2017 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+class ClassyClass
+{
+
+public:
+//Constructor Definition
+ClassyClass();
+
+//define destructors
+~ClassyClass();
+
+//Add Function headers here
+void setLEDstate(int state);
+
+
+
+
+
+private:
+//Add all private variables/Objects here only ClassyClass can see these
+
+//Essentially global to this Class
+int imprivate;
+
+DigitalOut ledy2_(p9);
+
+};
+