AP_Baro: Add I2C Access

This commit is contained in:
murata 2019-10-27 15:28:14 +09:00 committed by Andrew Tridgell
parent 117630a469
commit 233fb94417

View File

@ -135,7 +135,11 @@ bool AP_Baro_DPS280::init()
return false;
}
dev->set_read_flag(0x80);
// setup to allow reads on SPI
if (dev->bus_type() == AP_HAL::Device::BUS_TYPE_SPI) {
dev->set_read_flag(0x80);
}
dev->set_speed(AP_HAL::Device::SPEED_HIGH);
uint8_t whoami=0;