no-OS
|
Relay interface file. More...
Go to the source code of this file.
Functions | |
int | relay_init (struct no_os_gpio_desc **relay) |
Initialize relay component. More... | |
int | relay_open (struct no_os_gpio_desc *relay) |
Open relay command. More... | |
int | relay_close (struct no_os_gpio_desc *relay) |
Close relay command. More... | |
int | relay_state (struct no_os_gpio_desc *relay, uint8_t *state) |
Relay command line state. More... | |
uint8_t | get_relay_status (void) |
Get relay status. More... | |
void | set_relay_status (void) |
Set relay status to CLOSED - 1. More... | |
void | reset_relay_status (void) |
Set relay status to OPENED - 0. More... | |
Relay interface file.
Copyright (c) 2023 Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
uint8_t get_relay_status | ( | void | ) |
Get relay status.
Get relay status
int relay_close | ( | struct no_os_gpio_desc * | relay | ) |
Close relay command.
Close relay command
relay | - relay GPIO pin description |
int relay_init | ( | struct no_os_gpio_desc ** | relay | ) |
Initialize relay component.
Initialize relay
relay | - relay GPIO pin description |
int relay_open | ( | struct no_os_gpio_desc * | relay | ) |
Open relay command.
Open relay cmmand
relay | - relay GPIO pin description |
int relay_state | ( | struct no_os_gpio_desc * | relay, |
uint8_t * | state | ||
) |
Relay command line state.
Relay command line state
relay | - relay GPIO pin description |
state | - relay state (0 - OPEN, 1 - CLOSED) |
void reset_relay_status | ( | void | ) |
Set relay status to OPENED - 0.
Set relay status to OPENED - 0
void set_relay_status | ( | void | ) |
Set relay status to CLOSED - 1.
Set relay status to CLOSED - 1