summaryrefslogtreecommitdiff
path: root/model/driver
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-05 15:42:55 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-05 15:42:55 +0100
commitbe3efdeb8840fb7cdf5c4d2f014e321a4bfe8bcd (patch)
tree96ee0c36fa9669134297d4fdf8a3df68bb338079 /model/driver
parent32b799a03cf07de504a77b19432dc523166f472b (diff)
woring codegen for lm75 and sharp96 DFA
Diffstat (limited to 'model/driver')
-rw-r--r--model/driver/lm75.dfa4
-rw-r--r--model/driver/sharp96.dfa36
2 files changed, 39 insertions, 1 deletions
diff --git a/model/driver/lm75.dfa b/model/driver/lm75.dfa
index 5aadb8f..2c136f9 100644
--- a/model/driver/lm75.dfa
+++ b/model/driver/lm75.dfa
@@ -1,4 +1,6 @@
-instance: lm75
+codegen:
+ instance: lm75
+ includes: ['driver/lm75.h']
parameters:
- os
diff --git a/model/driver/sharp96.dfa b/model/driver/sharp96.dfa
new file mode 100644
index 0000000..9b356db
--- /dev/null
+++ b/model/driver/sharp96.dfa
@@ -0,0 +1,36 @@
+codegen:
+ instance: sharp96
+ includes: ['driver/spi_b.h', 'driver/sharp96.h']
+ setup: ['spi.setup();', 'sharp96.setup();']
+
+states:
+ - UNINITIALIZED
+ - POWERON
+ - POWEROFF
+
+transition:
+ setup:
+ src: [UNINITIALIZED]
+ dst: POWEROFF
+ powerOn:
+ src: [POWEROFF]
+ dst: POWERON
+ powerOff:
+ src: [POWERON]
+ dst: POWEROFF
+ clear:
+ src: [POWERON]
+ dst: POWERON
+ writeLine:
+ src: [POWERON]
+ dst: POWERON
+ arguments:
+ - name: line_no
+ values: [0, 63, 95]
+ - name: data
+ values:
+ - '(unsigned char *)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"'
+ - '(unsigned char *)"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"'
+ toggleVCOM:
+ src: [POWERON]
+ dst: POWERON