65,21 → 65,19 |
/*********************************************/ |
/* Initialize Interface to MK3MAG Compass */ |
/*********************************************/ |
void MK3MAG_Init(void) { |
void MK3MAG_init(void) { |
// Port PC4 connected to PWM output from compass module |
DDRC &= ~(1 << DDC4); // set as input |
PORTC |= (1 << PORTC4); // pull up to increase PWM counter also if nothing is connected |
|
PWMTimeout = 0; |
|
toMk3Mag.CalState = 0; |
toMk3Mag.Orientation = 1; |
toMk3Mag.calState = 0; |
toMk3Mag.orientation = 1; |
} |
|
/*********************************************/ |
/* Get PWM from MK3MAG */ |
/*********************************************/ |
void MK3MAG_Update(void) {// called every 102.4 us by timer 0 ISR |
void MK3MAG_periodicTask(void) {// called every 102.4 us by timer 0 ISR |
static uint16_t PWMCount = 0; |
static uint16_t beepDelay = 0; |
static uint16_t debugCounter = 0; |