summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/display.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Concept/Framework/display.h')
-rw-r--r--source/Concept/Framework/display.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/source/Concept/Framework/display.h b/source/Concept/Framework/display.h
new file mode 100644
index 0000000..8e6e0a4
--- /dev/null
+++ b/source/Concept/Framework/display.h
@@ -0,0 +1,60 @@
+#ifndef _DISPLAY_H
+#define _DISPLAY_H
+
+#include "stdafx.h"
+
+class Display : public IO_Module
+{
+public:
+ Display()
+ {
+ this->parent = NULL;
+ this->moduleId = 0;
+ }
+
+ Display(uint32 displayId)
+ {
+ this->parent = NULL;
+ this->moduleId = displayId;
+
+ switch(displayId)
+ {
+ case IO_DISPLAY_MAIN:
+ msleep(500);
+ uart1_init(103);//9600 BAUD at 16MHz Atmel
+ sleep(2);
+ break;
+ default:
+ break;
+ }
+ }
+
+protected:
+ //Hardware
+ volatile uint8* hardwarePort;
+ volatile uint16* pwmSpeed;
+ uint8 pinForward;
+ uint8 pinReverse;
+
+public:
+ void Print(char* newString)
+ {
+ switch(moduleId)
+ {
+ case IO_DISPLAY_MAIN:
+ uart1_puts(newString);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Print(int32 newInteger)
+ {
+ char buffer[12];
+ ltoa(newInteger, buffer, 10);
+ Print(buffer);
+ }
+};
+
+#endif