/* MPU6000 implementation of the HMC5843 */ AP_HMC5843_SerialBus_MPU6000::AP_HMC5843_SerialBus_MPU6000(AP_InertialSensor &ins, uint8_t addr) { // Only initialize members. Fails are handled by configure or while // getting the semaphore _bus = ins.get_auxiliary_bus(HAL_INS_MPU60XX_SPI); if (!_bus) return; _slave = _bus->request_next_slave(addr); }
/* HMC5843 on an auxiliary bus of IMU driver */ AP_HMC5843_BusDriver_Auxiliary::AP_HMC5843_BusDriver_Auxiliary(AP_InertialSensor &ins, uint8_t backend_id, uint8_t addr) { /* * Only initialize members. Fails are handled by configure or while * getting the semaphore */ _bus = ins.get_auxiliary_bus(backend_id); if (!_bus) { return; } _slave = _bus->request_next_slave(addr); }