no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
relay.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __RELAY_H__
34#define __RELAY_H__
35
37int relay_init(struct no_os_gpio_desc **relay);
38
40int relay_open(struct no_os_gpio_desc *relay);
41
43int relay_close(struct no_os_gpio_desc *relay);
44
46int relay_state(struct no_os_gpio_desc *relay, uint8_t *state);
47
49uint8_t get_relay_status(void);
50
52void set_relay_status(void);
53
55void reset_relay_status(void);
56
57#endif /* __RELAY_H__ */
void set_relay_status(void)
Set relay status to CLOSED - 1.
Definition relay.c:108
int relay_close(struct no_os_gpio_desc *relay)
Close relay command.
Definition relay.c:78
int relay_init(struct no_os_gpio_desc **relay)
Initialize relay component.
Definition relay.c:46
int relay_open(struct no_os_gpio_desc *relay)
Open relay command.
Definition relay.c:68
void reset_relay_status(void)
Set relay status to OPENED - 0.
Definition relay.c:117
int relay_state(struct no_os_gpio_desc *relay, uint8_t *state)
Relay command line state.
Definition relay.c:89
uint8_t get_relay_status(void)
Get relay status.
Definition relay.c:99
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84