Disable HMC5883L MAG Data Ready GPIO signal line initialisation except

on naze.

Note: The signal does not appear to be used by the code anyway.
This commit is contained in:
Dominic Clifton 2014-09-26 02:12:29 +01:00
parent 6013d9dc6a
commit 13b1d28f6e
1 changed files with 2 additions and 0 deletions

View File

@ -130,6 +130,7 @@ void hmc5883lInit(void)
int32_t xyz_total[3] = { 0, 0, 0 }; // 32 bit totals so they won't overflow. int32_t xyz_total[3] = { 0, 0, 0 }; // 32 bit totals so they won't overflow.
bool bret = true; // Error indicator bool bret = true; // Error indicator
#ifdef NAZE
if (hse_value == 8000000) { if (hse_value == 8000000) {
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
// PB12 - MAG_DRDY output on rev4 hardware // PB12 - MAG_DRDY output on rev4 hardware
@ -143,6 +144,7 @@ void hmc5883lInit(void)
gpio.pin = Pin_14; gpio.pin = Pin_14;
gpioInit(GPIOC, &gpio); gpioInit(GPIOC, &gpio);
} }
#endif
delay(50); delay(50);
i2cWrite(MAG_ADDRESS, HMC58X3_R_CONFA, 0x010 + HMC_POS_BIAS); // Reg A DOR = 0x010 + MS1, MS0 set to pos bias i2cWrite(MAG_ADDRESS, HMC58X3_R_CONFA, 0x010 + HMC_POS_BIAS); // Reg A DOR = 0x010 + MS1, MS0 set to pos bias