diff options
author | sicarius <devnull@localhost> | 2007-02-11 20:03:00 +0100 |
---|---|---|
committer | sicarius <devnull@localhost> | 2007-02-11 20:03:00 +0100 |
commit | 05c8b0af602b222d00c227560682158333b726a2 (patch) | |
tree | 98a7eaa96222097b9d74343b37447820f9250efc /source/AVR_Studio/Soccer/hal/board.h | |
parent | 1a6b28b1c2a68cfccbe8f4ed9866aadf88db7085 (diff) | |
download | rc2007-soccer-05c8b0af602b222d00c227560682158333b726a2.tar rc2007-soccer-05c8b0af602b222d00c227560682158333b726a2.zip |
Added lot's of code-files used during work
Diffstat (limited to 'source/AVR_Studio/Soccer/hal/board.h')
-rwxr-xr-x | source/AVR_Studio/Soccer/hal/board.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/source/AVR_Studio/Soccer/hal/board.h b/source/AVR_Studio/Soccer/hal/board.h new file mode 100755 index 0000000..dd177f1 --- /dev/null +++ b/source/AVR_Studio/Soccer/hal/board.h @@ -0,0 +1,38 @@ +#ifndef _BOARD_H_
+#define _BOARD_H_
+
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <stdlib.h>
+#include "uart.h"
+
+//#define abs(a) ((a < 0)? -a : a)
+
+#define BEEPER_PIN PG2
+
+// Definiere PWM-Ports für die Motoren/Dribbler
+#define MOTOR0_PWM OCR3A
+#define MOTOR1_PWM OCR3B
+#define MOTOR2_PWM OCR1A
+#define DRIBBLER_PWM OCR1C
+
+#define UART_BAUD_RATE 9600
+
+class Board
+{
+private:
+public:
+ Board();
+ ~Board();
+
+ int GetADC(uint8_t channel);
+ void beep(int freq);
+ void ledOn();
+ void ledOff();
+ void led(bool status);
+ void motor(int i, int speed);
+};
+
+#endif
+
+
|