diff options
author | Andrew Tridgell <tridge@samba.org> | 2014-07-08 21:09:12 +1000 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-12 16:25:43 +0200 |
commit | 93d444d1aade59b5e88f41b71c842a00ab950c64 (patch) | |
tree | bac1fefd6a71196c7584804d38bf765612d11434 /src/drivers/drv_device.h | |
parent | a2f528c5ba20ade8c3be200ed07fb6e925030c0d (diff) | |
download | px4-firmware-93d444d1aade59b5e88f41b71c842a00ab950c64.tar.gz px4-firmware-93d444d1aade59b5e88f41b71c842a00ab950c64.tar.bz2 px4-firmware-93d444d1aade59b5e88f41b71c842a00ab950c64.zip |
device: added a _device_id to all drivers
this device ID identifies a specific device via the tuple of (bus, bus
type, address, devtype). This allows device specific configuration
data to be stored along with a device ID, so the code can know when
the user has changed device configuration (such as removing an
external compass), and either invalidate the device configuration or
force the user to re-calibrate
Diffstat (limited to 'src/drivers/drv_device.h')
-rw-r--r-- | src/drivers/drv_device.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/drv_device.h b/src/drivers/drv_device.h index b310beb74..19d55cef3 100644 --- a/src/drivers/drv_device.h +++ b/src/drivers/drv_device.h @@ -59,4 +59,11 @@ /** check publication block status */ #define DEVIOCGPUBBLOCK _DEVICEIOC(1) +/** + * Return device ID, to enable matching of configuration parameters + * (such as compass offsets) to specific sensors + */ +#define DEVIOCGDEVICEID _DEVICEIOC(2) + + #endif /* _DRV_DEVICE_H */ |