aboutsummaryrefslogtreecommitdiffstats
path: root/os/ex/ST/lps25h.c
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2018-02-05 11:24:13 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2018-02-05 11:24:13 +0000
commit8c23b103dd0c50f98dec7509b0452bae2043dcae (patch)
tree987c8858757be2c11db3f3f0bf0b17ae086e4767 /os/ex/ST/lps25h.c
parent11eb30f8fe72f663071b8204b122ee5e1d7fdfcd (diff)
downloadChibiOS-8c23b103dd0c50f98dec7509b0452bae2043dcae.tar.gz
ChibiOS-8c23b103dd0c50f98dec7509b0452bae2043dcae.tar.bz2
ChibiOS-8c23b103dd0c50f98dec7509b0452bae2043dcae.zip
Updated LPS25H driver to v 1.0.4 (Fixing Bug #915).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11446 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ex/ST/lps25h.c')
-rw-r--r--os/ex/ST/lps25h.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/os/ex/ST/lps25h.c b/os/ex/ST/lps25h.c
index 8af5f6e01..ad5b197c9 100644
--- a/os/ex/ST/lps25h.c
+++ b/os/ex/ST/lps25h.c
@@ -83,7 +83,8 @@ msg_t lps25hI2CReadRegister(I2CDriver *i2cp, lps25h_sad_t sad, uint8_t reg,
* @notapi
* @return the operation status.
*/
-msg_t lps25hI2CWriteRegister(I2CDriver *i2cp, lps25h_sad_t sad, uint8_t* txbuf, size_t n) {
+msg_t lps25hI2CWriteRegister(I2CDriver *i2cp, lps25h_sad_t sad, uint8_t* txbuf,
+ size_t n) {
if (n > 1)
(*txbuf) |= LPS25H_SUB_MS;
return i2cMasterTransmitTimeout(i2cp, sad, txbuf, n + 1, NULL, 0,
@@ -196,11 +197,11 @@ static msg_t reset_sensivity(void *ip) {
return MSG_OK;
}
-static const struct BaseSensorVMT vmt_basesensor = {
+static const struct BaseSensorVMT vmt_sensor = {
get_axes_number, read_raw, read_cooked
};
-static const struct BaseBarometerVMT vmt_basebarometer = {
+static const struct LPS25HBarometerVMT vmt_barometer = {
get_axes_number, read_raw, read_cooked,
set_bias, reset_bias, set_sensivity, reset_sensivity
};
@@ -218,8 +219,8 @@ static const struct BaseBarometerVMT vmt_basebarometer = {
*/
void lps25hObjectInit(LPS25HDriver *devp) {
- devp->vmt_basesensor = &vmt_basesensor;
- devp->vmt_basebarometer = &vmt_basebarometer;
+ devp->vmt_sensor = &vmt_sensor;
+ devp->vmt_barometer = &vmt_barometer;
devp->config = NULL;
devp->bias = 0;
devp->state = LPS25H_STOP;