aboutsummaryrefslogtreecommitdiffstats
path: root/os/ex/ST/l3gd20.c
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-03-11 15:57:29 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-03-11 15:57:29 +0000
commitc27d4ae937cdfd4829ed8290efd8e079181d3bc5 (patch)
tree4d1d6ec6f1c67e8398bd04fbd854287d3c429c5f /os/ex/ST/l3gd20.c
parentad75d9621f1e6903f830af7dacccb300a99900af (diff)
downloadChibiOS-c27d4ae937cdfd4829ed8290efd8e079181d3bc5.tar.gz
ChibiOS-c27d4ae937cdfd4829ed8290efd8e079181d3bc5.tar.bz2
ChibiOS-c27d4ae937cdfd4829ed8290efd8e079181d3bc5.zip
Updated l3gd20 files, added working draft of lsm6ds0
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9079 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ex/ST/l3gd20.c')
-rw-r--r--os/ex/ST/l3gd20.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/os/ex/ST/l3gd20.c b/os/ex/ST/l3gd20.c
index 07b9b8a32..46f9bb434 100644
--- a/os/ex/ST/l3gd20.c
+++ b/os/ex/ST/l3gd20.c
@@ -287,11 +287,16 @@ static msg_t calibrate(void *ip) {
return MSG_OK;
}
-static const struct L3GD20VMT vmt = {
+static const struct BaseSensorVMT vmtse = {
+ get_axes_number, read_raw, read_cooked
+};
+
+static const struct BaseGyroscopeVMT vmtgy = {
get_axes_number, read_raw, read_cooked,
reset_calibration, calibrate
};
+
/*===========================================================================*/
/* Driver exported functions. */
/*===========================================================================*/
@@ -306,7 +311,9 @@ static const struct L3GD20VMT vmt = {
void l3gd20ObjectInit(L3GD20Driver *devp) {
uint32_t i;
- devp->vmt = &vmt;
+ devp->vmtse = &vmtse;
+ devp->vmtgy = &vmtgy;
+ devp->vmt = (struct L3GD20VMT*) &vmtgy;
devp->state = L3GD20_STOP;
devp->config = NULL;
for(i = 0; i < L3GD20_NUMBER_OF_AXES; i++)