summaryrefslogtreecommitdiff
path: root/model/driver/mpu9250.dfa
blob: a60dfb9fa34c5ac508f25291a65c3c6f1b1b3f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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: [SLEEP, LP_ACCEL, ACCEL, GYRO, MAGNET, NINEAXIS]
    dst: STANDBY
  lowPowerAccelOnly:
    src: [SLEEP, STANDBY, NINEAXIS, LP_ACCEL, 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
  nineAxis:
    src: [SLEEP, STANDBY, LP_ACCEL, ACCEL, GYRO, MAGNET]
    dst: NINEAXIS