diff options
Diffstat (limited to 'source/Concept/Framework/led.h')
-rw-r--r-- | source/Concept/Framework/led.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/source/Concept/Framework/led.h b/source/Concept/Framework/led.h deleted file mode 100644 index f0f3982..0000000 --- a/source/Concept/Framework/led.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef _LED_H
-#define _LED_H
-
-#include "stdafx.h"
-
-class Led : public IO_Module
-{
-public:
- Led()
- {
- this->enabled = false;
- this->parent = NULL;
- this->moduleId = 0;
- this->hardwarePort = NULL;
- this->pinPower = 0;
- }
-
- Led(uint32 ledId)
- {
- this->enabled = false;
- this->parent = NULL;
- this->moduleId = ledId;
-
- switch(ledId)
- {
- case IO_LED_MAIN:
- this->hardwarePort = &PORTB;
- this->pinPower = (1 << 1);
- break;
- default:
- this->hardwarePort = NULL;
- this->pinPower = 0;
- break;
- }
- }
-
-protected:
- bool enabled;
-
- //Hardware
- volatile uint8* hardwarePort;
- uint8 pinPower;
-
-public:
- bool GetEnabled()
- {
- return enabled;
- }
-
- void SetEnabled(bool newStatus)
- {
- enabled = newStatus;
-
- if(enabled)
- {
- *hardwarePort &= ~pinPower;
- }
- else
- {
- *hardwarePort |= pinPower;
- }
- }
-};
-
-#endif |