diff options
-rw-r--r-- | model/driver/lm75.dfa | 4 | ||||
-rw-r--r-- | model/driver/sharp96.dfa | 36 |
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 |