Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 278 → Rev 279

/branches/v0.60_MicroMag3_Nick666/compass.c
50,9 → 50,9
case MM3_START_TRANSFER:
PORTB &= ~(1<<PB2); // J8 auf Low (war ~125 µs auf High)
if (MM3.AXIS == MM3_X) SPDR = 0x41; // Schreiben ins SPDR löst automatisch Übertragung (MOSI und MISO) aus
else if (MM3.AXIS == MM3_Y) SPDR = 0x42; // Micromag Period Select ist auf 1024 (0x50)
else if (MM3.AXIS == MM3_Z) SPDR = 0x43; // 1: x-Achse, 2: Y-Achse, 3: Z-Achse
if (MM3.AXIS == MM3_X) SPDR = 0x51; // Schreiben ins SPDR löst automatisch Übertragung (MOSI und MISO) aus
else if (MM3.AXIS == MM3_Y) SPDR = 0x52; // Micromag Period Select ist auf 1024 (0x50)
else if (MM3.AXIS == MM3_Z) SPDR = 0x53; // 1: x-Achse, 2: Y-Achse, 3: Z-Achse
MM3.DRDY = SetDelay(15); // Laut Datenblatt max. Zeit bis Messung fertig (bei PS 1024)
MM3.STATE = MM3_WAIT_DRDY;