diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-01-08 08:43:14 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-01-08 08:43:14 +0100 |
commit | fb7f0eae5ccf35920abb981373fcd8ba083c60b9 (patch) | |
tree | b4db9c564ad20abea8bbd4785e3629658caa65a2 /model/arch/msp430fr5969lp/driver | |
parent | f3cc28296c7cf60b904357dfb97571a67b1f6b98 (diff) |
Finish simple MSP430FR5969LP GPIO driver
Diffstat (limited to 'model/arch/msp430fr5969lp/driver')
-rw-r--r-- | model/arch/msp430fr5969lp/driver/gpio.dfa | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/model/arch/msp430fr5969lp/driver/gpio.dfa b/model/arch/msp430fr5969lp/driver/gpio.dfa index b1f0708..90eaa63 100644 --- a/model/arch/msp430fr5969lp/driver/gpio.dfa +++ b/model/arch/msp430fr5969lp/driver/gpio.dfa @@ -1,13 +1,39 @@ -states: - - UNINITIALIZED - - P0_INPUT - - P0_INPUT_PULLUP - - P0_OUTPUT_LOW - - P0_OUTPUT_HIGH +# ! LED values are estimates at the moment +state: + UNINITIALIZED: + INITIALIZED: + power: + static: 0 + function: + raw: (regression_arg(0) * parameter(led0) + regression_arg(1) * parameter(led1)) * parameter(voltage_v) + regression_args: [2778, 2778] + +parameters: +- led0 +- led1 +- voltage_v transition: setup: src: [UNINITIALIZED] - dst: P0_OUTPUT - input: - src: [P0_INPUT, P0_INPUT_PULLUP, P0_OUTPUT_LOW, P0_OUTPUT_HIGH] + dst: INITIALIZED + set_param: + led0: 0 + led1: 0 + voltage_v: 3.6 + led_on0: + loop: [INITIALIZED] + set_param: + led0: 1 + led_on1: + loop: [INITIALIZED] + set_param: + led1: 1 + led_off0: + loop: [INITIALIZED] + set_param: + led0: 0 + led_off1: + loop: [INITIALIZED] + set_param: + led1: 0 |