diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-28 15:45:56 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-28 15:45:56 +0100 |
commit | 9587125842f839acd79956f4827231e2df66ffc2 (patch) | |
tree | 6bad01d68a25358ccc04f60bc22f6b8315284253 /model | |
parent | e5436cc50e489487a150c5a6c8bff085ba4c63c7 (diff) |
MPU9250: Add AEMR DFA driver functions and model
Diffstat (limited to 'model')
-rw-r--r-- | model/driver/mpu9250.dfa | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/model/driver/mpu9250.dfa b/model/driver/mpu9250.dfa new file mode 100644 index 0000000..b1cc381 --- /dev/null +++ b/model/driver/mpu9250.dfa @@ -0,0 +1,48 @@ +codegen: + instance: mpu9250 + includes: ['driver/i2c.h', 'driver/mpu9250.h'] + flags: ['drivers=mpu9250', 'arch_drivers=i2c'] + setup: + - i2c.setup(); + +parameters: +- accel_odr + +states: +- UNINITIALIZED +- SLEEP +- STANDBY +- LP_ACCEL +- ACCEL +- GYRO +- MAGNET +- NINEAXIS + +transition: + init: + src: [UNINITIALIZED, SLEEP, STANDBY, LP_ACCEL, ACCEL, GYRO, MAGNET, NINEAXIS] + dst: NINEAXIS + set_param: + accel_odr: 0 + sleep: + src: [STANDBY, LP_ACCEL, ACCEL, GYRO, MAGNET, NINEAXIS] + dst: SLEEP + standby: + src: [STANDBY, LP_ACCEL, ACCEL, GYRO, MAGNET, NINEAXIS] + dst: SLEEP + lowPowerAccelOnly: + src: [SLEEP, STANDBY, NINEAXIS, ACCEL, GYRO, MAGNET] + dst: LP_ACCEL + arguments: + - name: rate + values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + parameter: accel_odr + accelOnly: + src: [SLEEP, STANDBY, LP_ACCEL, GYRO, MAGNET, NINEAXIS] + dst: ACCEL + gyroOnly: + src: [SLEEP, STANDBY, LP_ACCEL, ACCEL, MAGNET, NINEAXIS] + dst: GYRO + magnetOnly: + src: [SLEEP, STANDBY, LP_ACCEL, ACCEL, GYRO, NINEAXIS] + dst: MAGNET |