From be3efdeb8840fb7cdf5c4d2f014e321a4bfe8bcd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 5 Mar 2019 15:42:55 +0100 Subject: woring codegen for lm75 and sharp96 DFA --- model/driver/lm75.dfa | 4 +++- model/driver/sharp96.dfa | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 model/driver/sharp96.dfa (limited to 'model') 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 -- cgit v1.2.3