diff options
author | sicarius <devnull@localhost> | 2007-02-17 01:35:01 +0100 |
---|---|---|
committer | sicarius <devnull@localhost> | 2007-02-17 01:35:01 +0100 |
commit | 4a2ba4b7105d168932163cbd07a062fdf2ba00e9 (patch) | |
tree | 1891a3eab64be1ae1a31e1b882ad9e6ce356620e /source/Concept/Framework/display.h | |
parent | 37d4d23f1dca88b6d074fb09739c9ae071551694 (diff) | |
download | rc2007-soccer-4a2ba4b7105d168932163cbd07a062fdf2ba00e9.tar rc2007-soccer-4a2ba4b7105d168932163cbd07a062fdf2ba00e9.zip |
+++ enhanced framework hardware interface
Diffstat (limited to 'source/Concept/Framework/display.h')
-rw-r--r-- | source/Concept/Framework/display.h | 60 |
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 |