|
|
@ -902,8 +902,6 @@ crc4(uint16_t *n_prom) |
|
|
|
bool |
|
|
|
bool |
|
|
|
start_bus(struct ms5611_bus_option &bus) |
|
|
|
start_bus(struct ms5611_bus_option &bus) |
|
|
|
{ |
|
|
|
{ |
|
|
|
warnx("start_bus id %u", (unsigned)bus.busid); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (bus.dev != nullptr) { |
|
|
|
if (bus.dev != nullptr) { |
|
|
|
errx(1, "bus option already started"); |
|
|
|
errx(1, "bus option already started"); |
|
|
|
} |
|
|
|
} |
|
|
@ -911,8 +909,6 @@ start_bus(struct ms5611_bus_option &bus) |
|
|
|
prom_u prom_buf; |
|
|
|
prom_u prom_buf; |
|
|
|
device::Device *interface = bus.interface_constructor(prom_buf, bus.busnum); |
|
|
|
device::Device *interface = bus.interface_constructor(prom_buf, bus.busnum); |
|
|
|
|
|
|
|
|
|
|
|
warnx("init ms5611 on bus id %u", (unsigned)bus.busid); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (interface->init() != OK) { |
|
|
|
if (interface->init() != OK) { |
|
|
|
delete interface; |
|
|
|
delete interface; |
|
|
|
warnx("no device on bus %u", (unsigned)bus.busid); |
|
|
|
warnx("no device on bus %u", (unsigned)bus.busid); |
|
|
@ -927,8 +923,6 @@ start_bus(struct ms5611_bus_option &bus) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
warnx("open ms5611 on bus %u", (unsigned)bus.busid); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int fd = open(bus.devpath, O_RDONLY); |
|
|
|
int fd = open(bus.devpath, O_RDONLY); |
|
|
|
|
|
|
|
|
|
|
|
/* set the poll rate to default, starts automatic data collection */ |
|
|
|
/* set the poll rate to default, starts automatic data collection */ |
|
|
|