diff options
author | px4dev <px4@purgatory.org> | 2012-12-01 19:29:36 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-12-01 19:29:36 -0800 |
commit | 2a8ef50df4747f0242459bdc22f11a46410f43bb (patch) | |
tree | 5ef1d863139e9f4a9425d20d3885ea93bcdaaf6b /apps/drivers/device/i2c.cpp | |
parent | 404332aefe5e2ad3d0766f99bd8d8efebdd4d331 (diff) | |
download | px4-firmware-2a8ef50df4747f0242459bdc22f11a46410f43bb.tar.gz px4-firmware-2a8ef50df4747f0242459bdc22f11a46410f43bb.tar.bz2 px4-firmware-2a8ef50df4747f0242459bdc22f11a46410f43bb.zip |
A driver and shell command for the BlinkM I2C LED controller.
Diffstat (limited to 'apps/drivers/device/i2c.cpp')
-rw-r--r-- | apps/drivers/device/i2c.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/drivers/device/i2c.cpp b/apps/drivers/device/i2c.cpp index 56112d767..474190d83 100644 --- a/apps/drivers/device/i2c.cpp +++ b/apps/drivers/device/i2c.cpp @@ -115,7 +115,7 @@ I2C::probe() } int -I2C::transfer(uint8_t *send, unsigned send_len, uint8_t *recv, unsigned recv_len) +I2C::transfer(const uint8_t *send, unsigned send_len, uint8_t *recv, unsigned recv_len) { struct i2c_msg_s msgv[2]; unsigned msgs; @@ -130,7 +130,7 @@ I2C::transfer(uint8_t *send, unsigned send_len, uint8_t *recv, unsigned recv_len if (send_len > 0) { msgv[msgs].addr = _address; msgv[msgs].flags = 0; - msgv[msgs].buffer = send; + msgv[msgs].buffer = const_cast<uint8_t *>(send); msgv[msgs].length = send_len; msgs++; } |