no-OS
state_machine.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __STATE_MACHINE_H__
34 #define __STATE_MACHINE_H__
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include <stdint.h>
40 
41 /******************************************************************************/
42 /********************** Macros and Constants Definitions **********************/
43 /******************************************************************************/
44 
45 #define FIRMWARE_VERSION ("v30923")
46 #define LED_NO (4u)
47 
48 /******************************************************************************/
49 /**************************** Enumerations ************************************/
50 /******************************************************************************/
65 };
66 
72  /* No error */
74  /* Relay error */
76  /* Input Vin error*/
78  /* Input undervoltage*/
80  /*Input overvoltage*/
82  /* RCD error */
84  /* Init RCD error */
86  /* Pilot error */
88  /* Diode error */
90  /* Overcurrent */
92  /* Overtemperature fault*/
94 #if defined(REV_D)
95  /*PE upstream error*/
96  INTF_PE_UPSTREAM_ERR,
97 #endif
98  /*PE fault*/
100 };
101 
107  /* Supply undervoltage */
109  /* RCD */
111  /* Overcurrent */
113  /* EV disconnected/no Earth */
115  /* Diode error */
117  /* Pilot error */
119  /* RCD test initiated */
121  /* RCD test completed */
123  /* RCD test failed */
125  /* Ventilation required */
127  /* Wait for 5 seconds for check overcurrent */
129  /* No event */
131  /*Initial check done*/
133  /*Wait*/
135  /*EV connected*/
137  /*Charging C*/
139  /*Charging D*/
141  /*Charging stopped*/
143  /* EVSE ready*/
145  /* Charging session requested*/
147  /* Charging started*/
149  /* Stop charging*/
151  /* Stop charging when cable unplugged while charging*/
153  /*Check relay*/
155  /*Relay check passed*/
157  /*IDLE B*/
159  /*Diode check*/
161  /*Diode check done*/
163  /*Vin undervoltage recovered*/
165  /*Undervoltage wait*/
167  /*Overtemeperature 1 reduce power*/
169  /*Overtemperature 2 stop*/
171  /*Overvoltage*/
173  /*PE error*/
175 
176 };
177 
178 /******************************************************************************/
179 /*********************** Structures Declarations ******************************/
180 /******************************************************************************/
185 struct stout {
186  /* AD9113 device structure */
188  /* Relay descriptor */
190  /* LED descriptors */
192  /* Current state */
194  /* Previous state */
196  /* PWM low value measured */
197  uint32_t pwm_low_val;
198  /* PWM low value measured */
199  uint32_t pwm_high_val;
200  /* V2 max */
201  int32_t v2_val;
202  /* V2 max */
203  int32_t v1_val;
204  /* I val */
205  int32_t i_val;
206  /* Temperature*/
207  int32_t temperature;
208  /* Pilot AC/DC */
209  uint8_t ac_dc;
210  /* grid type 0 - 230V, 1 - 120V*/
211  uint8_t grid;
212  /* Maximum current */
213  uint16_t i_limit;
214  /* Maximum current not charging*/
215  uint16_t i_limit_not_ch;
216  /* RCD pins */
220  /* Current error status */
222 };
223 
225 
226  /* I rms value */
227  int32_t i_rms;
228  /* V1 rms value */
229  int32_t v1_rms;
230  /* V2 rms value */
231  int32_t v2_rms;
232  /* I ADC value */
233  int32_t i_rms_adc;
234  /* V1 ADC value */
235  int32_t v1_rms_adc;
236  /* V2 ADC value */
237  int32_t v2_rms_adc;
238 };
239 
240 /******************************************************************************/
241 /************************ Functions Declarations ******************************/
242 /******************************************************************************/
244 int state_machine();
245 
248  enum state_machine_events_e event_in);
249 
252  enum state_machine_events_e event_in);
253 
256  struct stout *stout,
257  enum state_machine_events_e event_in);
258 
260 uint16_t get_action(void);
261 
263 void set_action_flag(void);
264 
266 void reset_action_flag(void);
267 
269 void inc_action_flag(void);
270 
272 void start_charging(void);
273 
275 void stop_charging(void);
276 
278 uint8_t car_is_charging(void);
279 
280 #endif /* __STATE_MACHINE_H__ */
state_machine_det_event_cp
enum state_machine_events_e state_machine_det_event_cp(struct stout *stout, enum state_machine_events_e event_in)
Determine next state based on CP measurements and previous events.
Definition: state_machine.c:923
rms_adc_values_read
int rms_adc_values_read(struct stout *stout, struct rms_adc_values *rms)
saves the current and voltage values in rms_adc structure
Definition: supply.c:351
S_M_STOP_CHARGING
@ S_M_STOP_CHARGING
Definition: state_machine.h:150
COMPUTE_VALUES_INTERVAL
#define COMPUTE_VALUES_INTERVAL
Definition: parameters.h:146
set_relay_status
void set_relay_status(void)
Set relay status to CLOSED - 1.
Definition: relay.c:122
set_action_flag
void set_action_flag(void)
Set take action flag.
Definition: state_machine.c:1349
S_M_CP_ERROR
@ S_M_CP_ERROR
Definition: state_machine.h:118
no_os_alloc.h
INTF_RELAY_ERR
@ INTF_RELAY_ERR
Definition: state_machine.h:75
rms_adc_values::v2_rms_adc
int32_t v2_rms_adc
Definition: state_machine.h:237
S_M_VENTILATION_REQ
@ S_M_VENTILATION_REQ
Definition: state_machine.h:126
relay_close
int relay_close(struct no_os_gpio_desc *relay)
Close relay command.
Definition: relay.c:91
SAMPLE_PINS_STEP_3
#define SAMPLE_PINS_STEP_3
Definition: parameters.h:120
state_machine_events_e
state_machine_events_e
State machine event.
Definition: state_machine.h:106
stout::ade9113
struct ade9113_dev * ade9113
Definition: state_machine.h:187
PWM_OFF
#define PWM_OFF
Definition: parameters.h:105
get_pwm_low_flag_state
int get_pwm_low_flag_state(void)
Get PWM low flag value.
Definition: pilot.c:126
pilot_init
int pilot_init(struct stout *stout)
Initialize pilot phase.
Definition: pilot.c:166
S_M_DIODE_ERR
@ S_M_DIODE_ERR
Definition: state_machine.h:116
S_M_CHECK_RELAY_PASSED
@ S_M_CHECK_RELAY_PASSED
Definition: state_machine.h:156
inc_action_flag
void inc_action_flag(void)
Increment take action flag.
Definition: state_machine.c:1369
adt75_reg_read
int adt75_reg_read(struct adt75_desc *desc, uint32_t addr, uint16_t *val)
Read the raw value of a register.
Definition: adt75.c:56
car_is_charging
uint8_t car_is_charging(void)
Get charging state.
Definition: state_machine.c:1399
stout::gpio_led
struct no_os_gpio_desc * gpio_led[LED_NO]
Definition: state_machine.h:191
PWM_DC
#define PWM_DC
Definition: parameters.h:104
reset_rcd_flag_state
void reset_rcd_flag_state(void)
Reset RCD flag value.
Definition: rcd.c:79
stout::temperature
int32_t temperature
Definition: state_machine.h:207
no_os_gpio_get_value
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:221
get_zero_cross_flag_state
int get_zero_cross_flag_state(void)
Get zero crossing flag value.
Definition: supply.c:71
STATE_RCD_SELF_TEST
@ STATE_RCD_SELF_TEST
Definition: state_machine.h:57
reset_pwm_low_flag_state
void reset_pwm_low_flag_state(void)
Reset PWM low flag value.
Definition: pilot.c:156
STATE_POWER_ON
@ STATE_POWER_ON
Definition: state_machine.h:56
adt75_remove
int adt75_remove(struct adt75_desc *desc)
Free the device descriptor.
Definition: adt75.c:160
stout::i_limit_not_ch
uint16_t i_limit_not_ch
Definition: state_machine.h:215
no_os_delay.h
Header file of Delay functions.
stout::i_val
int32_t i_val
Definition: state_machine.h:205
relay_open
int relay_open(struct no_os_gpio_desc *relay)
Open relay command.
Definition: relay.c:81
reset_relay_status
void reset_relay_status(void)
Set relay status to OPENED - 0.
Definition: relay.c:132
stout::v2_val
int32_t v2_val
Definition: state_machine.h:201
MILLIDEGREE_PER_DEGREE
#define MILLIDEGREE_PER_DEGREE
Definition: no_os_units.h:71
stout
Structure for Stout machine.
Definition: state_machine.h:185
S_M_CHARGING_D
@ S_M_CHARGING_D
Definition: state_machine.h:140
INTF_OVERCURRENT_ERR
@ INTF_OVERCURRENT_ERR
Definition: state_machine.h:91
S_M_DIODE_CHECK_DONE
@ S_M_DIODE_CHECK_DONE
Definition: state_machine.h:162
S_M_WAIT
@ S_M_WAIT
Definition: state_machine.h:134
stout::grid
uint8_t grid
Definition: state_machine.h:211
S_M_EV_CONNECTED
@ S_M_EV_CONNECTED
Definition: state_machine.h:136
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
no_os_print_log.h
Print messages helpers.
CPH_A_LIMIT_HIGH
#define CPH_A_LIMIT_HIGH
Definition: parameters.h:162
stout::i_limit
uint16_t i_limit
Definition: state_machine.h:213
S_M_INITIAL_CHECK_DONE
@ S_M_INITIAL_CHECK_DONE
Definition: state_machine.h:132
no_os_time
Structure holding time data (seconds, microseconds).
Definition: no_os_delay.h:47
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
ADT75_SIGN_BIT
#define ADT75_SIGN_BIT
Definition: adt75.h:54
S_M_OVERCURRENT_WAIT
@ S_M_OVERCURRENT_WAIT
Definition: state_machine.h:128
supply.h
Power supply phase interface file.
S_M_CHARGING
@ S_M_CHARGING
Definition: state_machine.h:138
S_M_OVER_TEMPERATURE_1
@ S_M_OVER_TEMPERATURE_1
Definition: state_machine.h:168
pilot_write_new_values
int pilot_write_new_values(struct stout *stout)
Update PWM values in the state machine structure.
Definition: pilot.c:374
RESTORE_TEST_PIN_STEP
#define RESTORE_TEST_PIN_STEP
Definition: parameters.h:117
stout::gpio_rcdac
struct no_os_gpio_desc * gpio_rcdac
Definition: state_machine.h:219
CPH_D_LIMIT_HIGH
#define CPH_D_LIMIT_HIGH
Definition: parameters.h:174
rcd_init
int rcd_init(struct no_os_irq_ctrl_desc *irq_desc, struct no_os_gpio_desc **rcm_test, struct no_os_gpio_desc **rcddc, struct no_os_gpio_desc **rcdac)
Initialize pilot phase.
Definition: rcd.c:92
INTF_INPUT_V_ERR_O
@ INTF_INPUT_V_ERR_O
Definition: state_machine.h:81
S_M_CHARGING_REQ
@ S_M_CHARGING_REQ
Definition: state_machine.h:146
RCD_TIME_REPEAT_INTERVAL
#define RCD_TIME_REPEAT_INTERVAL
Definition: parameters.h:142
TAKE_S_M_ACTION
#define TAKE_S_M_ACTION
Definition: parameters.h:112
reset_action_flag
void reset_action_flag(void)
Reset take action flag.
Definition: state_machine.c:1359
state_machine_det_event_supply
enum state_machine_events_e state_machine_det_event_supply(struct stout *stout, enum state_machine_events_e event_in)
Determine next state based on supply measurements and previous events.
Definition: state_machine.c:1259
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
INTF_TEMPERATURE_ERR
@ INTF_TEMPERATURE_ERR
Definition: state_machine.h:93
no_os_error.h
Error codes definition.
pr_debug
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
SAMPLE_PINS_STEP_1
#define SAMPLE_PINS_STEP_1
Definition: parameters.h:118
S_M_EVSE_READY
@ S_M_EVSE_READY
Definition: state_machine.h:144
adt75_init
int adt75_init(struct adt75_desc **desc, struct adt75_init_param *init_param)
Initialize the device structure.
Definition: adt75.c:132
rms_adc_values::v2_rms
int32_t v2_rms
Definition: state_machine.h:231
self_test_rcd_running
int self_test_rcd_running(struct stout *stout, uint16_t step, enum state_machine_events_e *event)
Running test for RCD.
Definition: self_test.c:286
S_M_CHARGING_STOPPED
@ S_M_CHARGING_STOPPED
Definition: state_machine.h:142
set_action_flag
void set_action_flag(void)
Set take action flag.
Definition: state_machine.c:1349
get_count_ms
uint32_t get_count_ms(void)
Definition: pilot.c:402
inter.h
GPIO interrupt phase interface file.
S_M_DIODE_ERR_CHECK
@ S_M_DIODE_ERR_CHECK
Definition: state_machine.h:160
stout::pwm_high_val
uint32_t pwm_high_val
Definition: state_machine.h:199
stout::err_status
enum interface_err_status_e err_status
Definition: state_machine.h:221
S_M_WAIT_B
@ S_M_WAIT_B
Definition: state_machine.h:158
zcross_cnt
uint16_t zcross_cnt
Definition: state_machine.c:56
stout::previous_state
enum charger_state_e previous_state
Definition: state_machine.h:195
INTF_RCD_ERROR
@ INTF_RCD_ERROR
Definition: state_machine.h:83
stout::gpio_rcm_test
struct no_os_gpio_desc * gpio_rcm_test
Definition: state_machine.h:217
STATE_FAULT
@ STATE_FAULT
Definition: state_machine.h:64
rms_adc_values
Definition: state_machine.h:224
S_M_RCD_TEST_TRIGGERED
@ S_M_RCD_TEST_TRIGGERED
Definition: state_machine.h:120
interface.h
User interface interface file.
ade9113.h
Header file of ADE9113 Driver.
STATE_B
@ STATE_B
Definition: state_machine.h:59
INTF_NO_ERR
@ INTF_NO_ERR
Definition: state_machine.h:73
S_M_PE_ERROR
@ S_M_PE_ERROR
Definition: state_machine.h:174
stout::current_state
enum charger_state_e current_state
Definition: state_machine.h:193
state_machine_det_event_temperature
enum state_machine_events_e state_machine_det_event_temperature(struct stout *stout, enum state_machine_events_e event_in)
Determine next state based on temperature measurements and previous events.
Definition: state_machine.c:1214
SKIP_CYCLES_AFTER_SELF_TEST
#define SKIP_CYCLES_AFTER_SELF_TEST
Definition: parameters.h:132
state_machine
int state_machine()
State machine main execution.
Definition: state_machine.c:69
INTF_PE_ERROR
@ INTF_PE_ERROR
Definition: state_machine.h:99
S_M_RCD_TEST_FAIL
@ S_M_RCD_TEST_FAIL
Definition: state_machine.h:124
LED_BLINKING_16A
#define LED_BLINKING_16A
Definition: parameters.h:156
self_test_relay_stuck
int self_test_relay_stuck(struct stout *stout)
Relay test.
Definition: self_test.c:504
ADJUST_TIME
#define ADJUST_TIME
Definition: parameters.h:180
S_M_UNDERVOLTAGE
@ S_M_UNDERVOLTAGE
Definition: state_machine.h:108
interface_err_status_e
interface_err_status_e
State machine fault condition.
Definition: state_machine.h:71
ade9113_dev::irq_ctrl
struct no_os_irq_ctrl_desc * irq_ctrl
Definition: ade9113.h:366
ADT75_TEMP_DIV
#define ADT75_TEMP_DIV
Definition: adt75.h:67
reset_action_flag
void reset_action_flag(void)
Reset take action flag.
Definition: state_machine.c:1359
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
S_M_OVERVOLTAGE
@ S_M_OVERVOLTAGE
Definition: state_machine.h:172
CPH_C_LIMIT_HIGH
#define CPH_C_LIMIT_HIGH
Definition: parameters.h:170
get_action
uint16_t get_action(void)
Get take action flag.
Definition: state_machine.c:1339
supply_init
int supply_init(struct ade9113_dev **device)
Initialize supply component.
Definition: supply.c:156
INTF_INPUT_V_ERR_U
@ INTF_INPUT_V_ERR_U
Definition: state_machine.h:79
stout::relay
struct no_os_gpio_desc * relay
Definition: state_machine.h:189
start_charging
void start_charging(void)
Signal that EV starts charging.
Definition: state_machine.c:1379
INTF_INIT_RCD_ERROR
@ INTF_INIT_RCD_ERROR
Definition: state_machine.h:85
S_M_UNDERVOLTAGE_WAIT
@ S_M_UNDERVOLTAGE_WAIT
Definition: state_machine.h:166
state_machine.h
STOUT state machine header file.
ade9113_drdy_int_enable
int ade9113_drdy_int_enable(struct ade9113_dev *dev)
DRDY inerrupt enable.
Definition: ade9113.c:2523
stout::pwm_low_val
uint32_t pwm_low_val
Definition: state_machine.h:197
ADT75_TEMP_MASK
#define ADT75_TEMP_MASK
Definition: adt75.h:53
reset_count_ms
void reset_count_ms(void)
Definition: pilot.c:408
COMPUTE_VRELAY_INTERVAL
#define COMPUTE_VRELAY_INTERVAL
Definition: parameters.h:148
GPIO_ZC_PIN
#define GPIO_ZC_PIN
Definition: parameters.h:91
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
SAMPLE_PINS_STEP_2
#define SAMPLE_PINS_STEP_2
Definition: parameters.h:119
relay.h
Relay interface file.
S_M_RCD
@ S_M_RCD
Definition: state_machine.h:110
is_charging
uint8_t is_charging
Definition: state_machine.c:58
S_M_OVER_TEMPERATURE_2
@ S_M_OVER_TEMPERATURE_2
Definition: state_machine.h:170
stop_charging
void stop_charging(void)
Signal that EV stops charging.
Definition: state_machine.c:1389
S_M_NO_EVENT
@ S_M_NO_EVENT
Definition: state_machine.h:130
VIN_LOW_LIMIT
#define VIN_LOW_LIMIT
Definition: common_data.h:81
PWM_DUTY_16A
#define PWM_DUTY_16A
Definition: parameters.h:103
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
FIRMWARE_VERSION
#define FIRMWARE_VERSION
Definition: state_machine.h:45
no_os_time::us
unsigned int us
Definition: no_os_delay.h:48
self_test.h
Self-tests interface file.
rcd.h
RCD interface file.
interface_disp
int interface_disp(struct stout *stout)
Display error code.
Definition: interface.c:124
pilot_pwm_timer_set_duty_cycle
void pilot_pwm_timer_set_duty_cycle(struct stout *stout, unsigned int duty_cycle)
Set PMW duty cycle.
Definition: pilot.c:271
car_is_charging
uint8_t car_is_charging(void)
Get charging state.
Definition: state_machine.c:1399
CP_DC_PWM_DELAY
#define CP_DC_PWM_DELAY
Definition: parameters.h:178
STATE_CHECK_RELAY
@ STATE_CHECK_RELAY
Definition: state_machine.h:63
get_gpio_flag_state
int get_gpio_flag_state(void)
Get GPIO flag value.
Definition: inter.c:104
charger_state_e
charger_state_e
ADE9113 waveorm data.
Definition: state_machine.h:55
state_machine_det_event_temperature
enum state_machine_events_e state_machine_det_event_temperature(struct stout *stout, enum state_machine_events_e event_in)
Determine next state based on temperature measurements and previous events.
Definition: state_machine.c:1214
TEMPERATURE_READ_RATE
#define TEMPERATURE_READ_RATE
Definition: parameters.h:150
STATE_C
@ STATE_C
Definition: state_machine.h:60
pilot_update_vals
void pilot_update_vals(void)
Update PWM values.
Definition: pilot.c:388
state_machine
int state_machine()
State machine main execution.
Definition: state_machine.c:69
state_machine_det_event_cp
enum state_machine_events_e state_machine_det_event_cp(struct stout *stout, enum state_machine_events_e event_in)
Determine next state based on CP measurements and previous events.
Definition: state_machine.c:923
self_test_startup
int self_test_startup(struct stout *stout, struct rms_adc_values *rms_adc_values)
Startup test.
Definition: self_test.c:465
rms_adc_values::i_rms_adc
int32_t i_rms_adc
Definition: state_machine.h:233
pilot.h
Pilot phase interface file.
S_M_OVERCURRENT
@ S_M_OVERCURRENT
Definition: state_machine.h:112
rms_adc_values::v1_rms
int32_t v1_rms
Definition: state_machine.h:229
no_os_time::s
unsigned int s
Definition: no_os_delay.h:48
inter_init
int inter_init(struct stout *stout)
Initialize inter phase.
Definition: inter.c:164
STATE_D
@ STATE_D
Definition: state_machine.h:61
no_os_get_time
struct no_os_time no_os_get_time(void)
Get current time.
Definition: chibios_delay.c:51
get_action
uint16_t get_action(void)
Get take action flag.
Definition: state_machine.c:1339
I_LIMIT_NOT_CHG
#define I_LIMIT_NOT_CHG
Definition: parameters.h:124
S_M_STOP_CHARGING_2
@ S_M_STOP_CHARGING_2
Definition: state_machine.h:152
LED_BLINKING_10A
#define LED_BLINKING_10A
Definition: parameters.h:158
VIN_LOW_LIMIT_2
#define VIN_LOW_LIMIT_2
Definition: common_data.h:85
interface_init
int interface_init(struct no_os_gpio_desc **gpio_led_desc)
Interface initialization routines.
Definition: interface.c:52
relay_init
int relay_init(struct no_os_gpio_desc **relay)
Initialize relay component.
Definition: relay.c:59
stout::v1_val
int32_t v1_val
Definition: state_machine.h:203
INTF_INPUT_V_ERR
@ INTF_INPUT_V_ERR
Definition: state_machine.h:77
LED_NO
#define LED_NO
Definition: state_machine.h:46
CPH_B_LIMIT_HIGH
#define CPH_B_LIMIT_HIGH
Definition: parameters.h:166
start_charging
void start_charging(void)
Signal that EV starts charging.
Definition: state_machine.c:1379
S_M_CHARGING_START
@ S_M_CHARGING_START
Definition: state_machine.h:148
rms_adc_values::v1_rms_adc
int32_t v1_rms_adc
Definition: state_machine.h:235
inc_action_flag
void inc_action_flag(void)
Increment take action flag.
Definition: state_machine.c:1369
S_M_VIN_RECOVER
@ S_M_VIN_RECOVER
Definition: state_machine.h:164
INTF_DIODE_ERR
@ INTF_DIODE_ERR
Definition: state_machine.h:89
VALUE_20MS
#define VALUE_20MS
Definition: parameters.h:140
S_M_DISCONNECTED
@ S_M_DISCONNECTED
Definition: state_machine.h:114
STATE_RELAY_OPEN
@ STATE_RELAY_OPEN
Definition: state_machine.h:62
STATE_A
@ STATE_A
Definition: state_machine.h:58
CP_H_LOW_LIMIT
#define CP_H_LOW_LIMIT
Definition: parameters.h:160
S_M_CHECK_STUCK_RELAY
@ S_M_CHECK_STUCK_RELAY
Definition: state_machine.h:154
PWM_DUTY_10A
#define PWM_DUTY_10A
Definition: parameters.h:102
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
PRINT_VALUES_TIME
#define PRINT_VALUES_TIME
Definition: parameters.h:144
ade9113_dev
ADE9113 Device structure.
Definition: ade9113.h:348
no_os_irq_disable
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:198
stout::ac_dc
uint8_t ac_dc
Definition: state_machine.h:209
stop_charging
void stop_charging(void)
Signal that EV stops charging.
Definition: state_machine.c:1389
adt75_desc
ADT75 device descriptor.
Definition: adt75.h:79
adt75_ip
struct adt75_init_param adt75_ip
Definition: common_data.c:176
rms_adc_values::i_rms
int32_t i_rms
Definition: state_machine.h:227
self_test_supply
int self_test_supply(struct stout *stout, struct rms_adc_values *rms_adc_values)
Startup test for power supply.
Definition: self_test.c:68
state_machine_det_event_supply
enum state_machine_events_e state_machine_det_event_supply(struct stout *stout, enum state_machine_events_e event_in)
Determine next state based on supply measurements and previous events.
Definition: state_machine.c:1259
DIODE_ERR_DELAY
#define DIODE_ERR_DELAY
Definition: parameters.h:152
get_rcd_flag_state
int get_rcd_flag_state(void)
Get RCD flag value.
Definition: rcd.c:69
INTF_PILOT_ERROR
@ INTF_PILOT_ERROR
Definition: state_machine.h:87
reset_zero_cross_flag_state
void reset_zero_cross_flag_state(void)
Reset zero crossing flag value.
Definition: supply.c:81
S_M_RCD_TEST_COMPLETED
@ S_M_RCD_TEST_COMPLETED
Definition: state_machine.h:122
stout::gpio_rcddc
struct no_os_gpio_desc * gpio_rcddc
Definition: state_machine.h:218