Kleinere Korrekturen an Portbelegung und Maussensorcode gemacht

This commit is contained in:
meyma 2007-02-13 20:12:00 +00:00
parent b090fa7757
commit ab9cf92c1a
3 changed files with 8 additions and 4 deletions

View file

@ -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)

View file

@ -1,6 +1,7 @@
#include "maussensor.h"
Maussensor::Maussensor(int index) {
// Setze die Pins entsprechend dem übergebenen Index
if(index == MAUSSENSOR0) {
sda_pin = MAUS0_SDA;
sck_pin = MAUS0_SCK;
@ -9,6 +10,9 @@ Maussensor::Maussensor(int index) {
sda_pin = MAUS1_SDA;
sck_pin = MAUS1_SCK;
}
// Initialisiere den Maussensor
maus_sens_init();
}
Maussensor::~Maussensor() {