aboutsummaryrefslogtreecommitdiffstats
path: root/os/ex/ST/l3gd20.c
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-03-09 13:17:36 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-03-09 13:17:36 +0000
commit8b32e5715ec1c99b5407f582551cc88975d2a001 (patch)
tree6bcc800abdb14eb948b7efb86055cbb21248ad72 /os/ex/ST/l3gd20.c
parente41ffa94241c241b4c7561625f120e0878ede1f3 (diff)
downloadChibiOS-8b32e5715ec1c99b5407f582551cc88975d2a001.tar.gz
ChibiOS-8b32e5715ec1c99b5407f582551cc88975d2a001.tar.bz2
ChibiOS-8b32e5715ec1c99b5407f582551cc88975d2a001.zip
fixed read_raw()
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9056 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ex/ST/l3gd20.c')
-rw-r--r--os/ex/ST/l3gd20.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/ex/ST/l3gd20.c b/os/ex/ST/l3gd20.c
index 3ed48ecf3..07b9b8a32 100644
--- a/os/ex/ST/l3gd20.c
+++ b/os/ex/ST/l3gd20.c
@@ -220,9 +220,9 @@ static msg_t read_raw(void *ip, int32_t axes[L3GD20_NUMBER_OF_AXES]) {
}
if(((L3GD20Driver *)ip)->config->axesenabling & L3GD20_AE_Z){
axes[2] = (int16_t)(l3gd20SPIReadRegister(((L3GD20Driver *)ip)->config->spip,
- L3GD20_AD_OUT_Y_L));
+ L3GD20_AD_OUT_Z_L));
axes[2] += (int16_t)(l3gd20SPIReadRegister(((L3GD20Driver *)ip)->config->spip,
- L3GD20_AD_OUT_Y_H) << 8);
+ L3GD20_AD_OUT_Z_H) << 8);
axes[2] -= ((L3GD20Driver *)ip)->bias[2];
}
#if L3GD20_SHARED_SPI