diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-05 20:35:03 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-05 20:35:03 +0100 |
commit | 6a2c0e83d51d98e9484e25bd7ecf24fd451bcf9e (patch) | |
tree | 3715edd30b790c71d23b8f55818cebb65799d634 /src/drivers/device | |
parent | fc837529fb7b13559afda273f8c48b463d1ae2a6 (diff) | |
parent | e672fdbbd6087baa01b2b1d638c4e850b5eb6f5c (diff) | |
download | px4-firmware-6a2c0e83d51d98e9484e25bd7ecf24fd451bcf9e.tar.gz px4-firmware-6a2c0e83d51d98e9484e25bd7ecf24fd451bcf9e.tar.bz2 px4-firmware-6a2c0e83d51d98e9484e25bd7ecf24fd451bcf9e.zip |
Merged master into nuttx_bringup
Diffstat (limited to 'src/drivers/device')
-rw-r--r-- | src/drivers/device/device.h | 7 | ||||
-rw-r--r-- | src/drivers/device/i2c.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/drivers/device/device.h b/src/drivers/device/device.h index 67aaa0aff..4d4bed835 100644 --- a/src/drivers/device/device.h +++ b/src/drivers/device/device.h @@ -445,6 +445,13 @@ protected: */ virtual int unregister_class_devname(const char *class_devname, unsigned class_instance); + /** + * Get the device name. + * + * @return the file system string of the device handle + */ + const char* get_devname() { return _devname; } + bool _pub_blocked; /**< true if publishing should be blocked */ private: diff --git a/src/drivers/device/i2c.h b/src/drivers/device/i2c.h index 705b398b0..8518596ea 100644 --- a/src/drivers/device/i2c.h +++ b/src/drivers/device/i2c.h @@ -58,7 +58,7 @@ public: /** * Get the address */ - int16_t get_address() { return _address; } + int16_t get_address() const { return _address; } protected: /** @@ -132,6 +132,7 @@ protected: */ void set_address(uint16_t address) { _address = address; + _device_id.devid_s.address = _address; } private: |