This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
rc2007-soccer/source/Concept/Framework/display.h
2007-02-17 00:35:01 +00:00

60 lines
873 B
C++

#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