mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 23:33:38 +08:00
I2C/SPI require device type in constructor
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
using namespace time_literals;
|
||||
|
||||
AEROFC_ADC::AEROFC_ADC(I2CSPIBusOption bus_option, int bus_number, int bus_frequency) :
|
||||
I2C("AEROFC_ADC", AEROFC_ADC_DEVICE_PATH, bus_number, SLAVE_ADDR, bus_frequency),
|
||||
I2C(DRV_ADC_DEVTYPE_AEROFC, MODULE_NAME, bus_number, SLAVE_ADDR, bus_frequency),
|
||||
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus_number),
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": sample"))
|
||||
{
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#define ADC_ENABLE_REG 0x00
|
||||
#define ADC_CHANNEL_REG 0x03
|
||||
#define MAX_CHANNEL 5
|
||||
#define AEROFC_ADC_DEVICE_PATH "/dev/aerofc_adc"
|
||||
|
||||
class AEROFC_ADC : public device::I2C, public I2CSPIDriver<AEROFC_ADC>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user