summaryrefslogtreecommitdiff
path: root/model/driver/mmsubstate.dfa
blob: 6fb0c626b6f08ed5e784c660040b4c4c88330fbe (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
codegen:
  instance: moody
  includes:
    - driver/i2c.h
    - driver/mmsubstate.h
  flags:
    - arch_drivers=i2c
    - drivers=mmsubstate
  setup:
    i2c.setup();

parameters:
  - substate_count
  - substate_duration
  - substate_power
  - static_p1
  - static_p2

states:
  - UNINITIALIZED
  - SLEEP
  - STATIC
  - SUB2
  - SUB8
  - SUBVAR

transition:
  sleep:
    src: [UNINITIALIZED, STATIC, SUB2, SUB8, SUBVAR]
    dst: SLEEP
    set_param:
      substate_count: 0
      substate_duration: 0
      substate_power: 0
  noSubstates:
    src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR]
    dst: STATIC
    arguments:
    - name: power1
      values: [30, 50, 80]
      parameter: static_p1
    - name: power2
      values: [30, 50, 80]
      parameter: static_p2
    set_param:
      substate_count: 0
      substate_duration: 0
      substate_power: 0
  twoSubstates:
    src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR]
    dst: SUB2
    set_param:
      substate_count: 2
    arguments:
    - name: switchDuration
      values: [5, 10, 15, 20]
      parameter: substate_duration
    - name: power
      values: [50, 100, 150]
      parameter: substate_power
  eightSubstates:
    src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR]
    dst: SUB8
    set_param:
      substate_count: 8
    arguments:
    - name: switchDuration
      values: [5, 10, 15, 20]
      parameter: substate_duration
    - name: power
      values: [50, 100, 150]
      parameter: substate_power
  setSubstates:
    src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR]
    dst: SUBVAR
    arguments:
    - name: substateCount
      values: [2, 4, 10, 12]
      parameter: substate_count
    - name: switchDuration
      values: [5, 10, 15, 20]
      parameter: substate_duration
    - name: power
      values: [255]
      parameter: substate_power