From 8c23b103dd0c50f98dec7509b0452bae2043dcae Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Mon, 5 Feb 2018 11:24:13 +0000 Subject: 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 --- os/ex/ST/lps25h.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'os/ex/ST/lps25h.c') 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; -- cgit v1.2.3