summaryrefslogtreecommitdiffstats
path: root/source/AVR_Studio/Soccer
diff options
context:
space:
mode:
authormeyma <devnull@localhost>2007-02-13 21:12:00 +0100
committermeyma <devnull@localhost>2007-02-13 21:12:00 +0100
commitab9cf92c1a0f1d400e7f46a346c47d952ea376cc (patch)
tree2116294849f26e6e7b778e2da71229e804a017c3 /source/AVR_Studio/Soccer
parentb090fa7757384b3d8a5e4ef4bdf841d338b070d9 (diff)
downloadrc2007-soccer-ab9cf92c1a0f1d400e7f46a346c47d952ea376cc.tar
rc2007-soccer-ab9cf92c1a0f1d400e7f46a346c47d952ea376cc.zip
Kleinere Korrekturen an Portbelegung und Maussensorcode gemacht
Diffstat (limited to 'source/AVR_Studio/Soccer')
-rwxr-xr-xsource/AVR_Studio/Soccer/hal/board.c4
-rwxr-xr-xsource/AVR_Studio/Soccer/hal/maussensor.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/source/AVR_Studio/Soccer/hal/board.c b/source/AVR_Studio/Soccer/hal/board.c
index 438973a..0731886 100755
--- a/source/AVR_Studio/Soccer/hal/board.c
+++ b/source/AVR_Studio/Soccer/hal/board.c
@@ -11,8 +11,8 @@ Board::Board() {
DDRB = (1 << PB0) | (1 << PB1) | (1 << PB2) | (1 << PB3) | (1 << PB4) | (1 << PB5) | (1 << PB6) | (1 << PB7);
PORTB = (1 << PB1); // Alle Low bis PB1 , kein Pollup
- // Alle Ausgänge
- DDRC = (1 << PC0) | (1 << PC1) | (1 << PC2) | (1 << PC3) | (1 << PC4) | (1 << PC5) | (1 << PC6) | (1 << PC7);
+ // Alle Ausgänge bis auf PC4/PC5 (Maussensor SDA)
+ DDRC = (1 << PC0) | (1 << PC1) | (1 << PC2) | (1 << PC3) | (1 << PC6) | (1 << PC7);
PORTC = 0; // Alle Low, kein Pollup
// Alle Ausgänge bis auf PD0+1(I2C) + 2+3(RS232)
diff --git a/source/AVR_Studio/Soccer/hal/maussensor.c b/source/AVR_Studio/Soccer/hal/maussensor.c
index 60121b3..2768b8e 100755
--- a/source/AVR_Studio/Soccer/hal/maussensor.c
+++ b/source/AVR_Studio/Soccer/hal/maussensor.c
@@ -1,6 +1,7 @@
#include "maussensor.h"
-Maussensor::Maussensor(int index) {
+Maussensor::Maussensor(int index) {
+ // Setze die Pins entsprechend dem übergebenen Index
if(index == MAUSSENSOR0) {
sda_pin = MAUS0_SDA;
sck_pin = MAUS0_SCK;
@@ -8,7 +9,10 @@ Maussensor::Maussensor(int index) {
else {
sda_pin = MAUS1_SDA;
sck_pin = MAUS1_SCK;
- }
+ }
+
+ // Initialisiere den Maussensor
+ maus_sens_init();
}
Maussensor::~Maussensor() {