summaryrefslogtreecommitdiff
path: root/model/arch/posix
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-05-24 08:33:40 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-05-24 08:33:40 +0200
commit86638f0ecdbfd5d5c86f664fc5717c6154a67973 (patch)
tree256deb51017ad9e4d9556346529123b84c30aed9 /model/arch/posix
parent1716621bc7ab29ef28e1ad89f7d9523e11445e47 (diff)
energy model WiP
Diffstat (limited to 'model/arch/posix')
-rw-r--r--model/arch/posix/driver/gpio.dfa31
1 files changed, 31 insertions, 0 deletions
diff --git a/model/arch/posix/driver/gpio.dfa b/model/arch/posix/driver/gpio.dfa
new file mode 100644
index 0000000..84c78e4
--- /dev/null
+++ b/model/arch/posix/driver/gpio.dfa
@@ -0,0 +1,31 @@
+codegen:
+ instance: gpio
+ includes: ['driver/gpio.h']
+
+states:
+ - UNINITIALIZED
+ - P0_INPUT
+ - P0_OUTPUT
+
+parameters:
+ - px00_status
+
+transition:
+ setup:
+ src: [UNINITIALIZED]
+ dst: P0_OUTPUT
+ input:
+ src: [P0_INPUT, P0_OUTPUT]
+ dst: P0_INPUT
+ arguments:
+ - name: pin
+ values: ['GPIO::px00']
+ output:
+ src: [P0_INPUT, P0_OUTPUT]
+ dst: P0_OUTPUT
+ arguments:
+ - name: pin
+ values: ['GPIO::px00']
+ - name: value
+ values: [0, 1]
+ parameter: px00_status