From a520c62d1ade74c5ba7736a2a69f5e493f8f96b4 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 29 Jan 2017 16:20:20 +0100 Subject: [PATCH] Allow setting the device ID in device driver --- src/drivers/device/device_nuttx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/drivers/device/device_nuttx.h b/src/drivers/device/device_nuttx.h index bf6ecefda6..dcbb65ac5f 100644 --- a/src/drivers/device/device_nuttx.h +++ b/src/drivers/device/device_nuttx.h @@ -159,6 +159,13 @@ public: */ virtual uint8_t get_device_address() { return _device_id.devid_s.address; } + /** + * Set the device type + * + * @return The device type + */ + virtual void set_device_type(uint8_t devtype) { _device_id.devid_s.devtype = devtype; } + /* broken out device elements. The bitfields are used to keep the overall value small enough to fit in a float accurately,