Improve EVSE hardware module

This commit is contained in:
2025-06-08 10:43:42 +01:00
parent 25744de46c
commit d5827eb0e3
4 changed files with 24 additions and 6 deletions

View File

@@ -90,5 +90,10 @@ void socket_lock_set_locked(bool locked);
*/
socket_lock_status_t socket_lock_get_status(void);
/**
* @brief Read the current physical lock state using the detection pin.
*/
bool socket_lock_is_locked_state(void);
#endif /* SOCKED_LOCK_H_ */

View File

@@ -51,6 +51,11 @@ static bool is_locked(void)
return gpio_get_level(board_config.socket_lock_detection_gpio) == detection_high;
}
bool socket_lock_is_locked_state(void)
{
return is_locked();
}
static void socket_lock_task_func(void* param)
{
uint32_t notification;