aboutsummaryrefslogtreecommitdiffstats
path: root/os/ex/ST/l3gd20.c
diff options
context:
space:
mode:
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++)