no-OS
relay.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __RELAY_H__
34 #define __RELAY_H__
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 
40 /******************************************************************************/
41 /************************* Functions Declarations******************************/
42 /******************************************************************************/
44 int relay_init(struct no_os_gpio_desc **relay);
45 
47 int relay_open(struct no_os_gpio_desc *relay);
48 
50 int relay_close(struct no_os_gpio_desc *relay);
51 
53 int relay_state(struct no_os_gpio_desc *relay, uint8_t *state);
54 
56 uint8_t get_relay_status(void);
57 
59 void set_relay_status(void);
60 
62 void reset_relay_status(void);
63 
64 #endif /* __RELAY_H__ */
set_relay_status
void set_relay_status(void)
Set relay status to CLOSED - 1.
Definition: relay.c:122
get_relay_status
uint8_t get_relay_status(void)
Get relay status.
Definition: relay.c:112
relay_close
int relay_close(struct no_os_gpio_desc *relay)
Close relay command.
Definition: relay.c:91
relay_close
int relay_close(struct no_os_gpio_desc *relay)
Close relay command.
Definition: relay.c:91
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
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
relay_open
int relay_open(struct no_os_gpio_desc *relay)
Open relay command.
Definition: relay.c:81
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
no_os_print_log.h
Print messages helpers.
get_relay_status
uint8_t get_relay_status(void)
Get relay status.
Definition: relay.c:112
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
reset_relay_status
void reset_relay_status(void)
Set relay status to OPENED - 0.
Definition: relay.c:132
relay_state
int relay_state(struct no_os_gpio_desc *relay, uint8_t *state)
Relay command line state.
Definition: relay.c:102
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
relay.h
Relay interface file.
relay_init
int relay_init(struct no_os_gpio_desc **relay)
Initialize relay component.
Definition: relay.c:59
relay_state
int relay_state(struct no_os_gpio_desc *relay, uint8_t *state)
Relay command line state.
Definition: relay.c:102
ade9113_gpio_relay_ip
struct no_os_gpio_init_param ade9113_gpio_relay_ip
Definition: common_data.c:88
relay_init
int relay_init(struct no_os_gpio_desc **relay)
Initialize relay component.
Definition: relay.c:59
set_relay_status
void set_relay_status(void)
Set relay status to CLOSED - 1.
Definition: relay.c:122
no_os_gpio_direction_output
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
no_os_gpio_get_optional
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75