summaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-01-08 16:20:19 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-01-08 16:20:19 +0100
commit0181e7e34983cdc384790ce995874db40380a24e (patch)
tree4cd2873bd8e9632d949b270ef205998146c5183e /model
parent2804752597795b957a7f002bafc92439aa327989 (diff)
Add basic MAX44009 energy model
Diffstat (limited to 'model')
-rw-r--r--model/driver/max44009.dfa22
1 files changed, 22 insertions, 0 deletions
diff --git a/model/driver/max44009.dfa b/model/driver/max44009.dfa
new file mode 100644
index 0000000..bdf1f2c
--- /dev/null
+++ b/model/driver/max44009.dfa
@@ -0,0 +1,22 @@
+state:
+ UNINITIALIZED:
+ ACTIVE:
+ power:
+ static: 4
+ function:
+ raw: parameter(voltage_v) * regression_arg(0)
+ regression_args: [1.2]
+
+parameters:
+# acceptable voltage range: 1.7 .. 3.6 V
+- voltage_v
+
+transition:
+ setup:
+ src: [UNINITIALIZED]
+ dst: ACTIVE
+ set_param:
+ voltage_v: 3.3
+ # TODO I2C pull-up cost
+ getLux:
+ loop: [ACTIVE]