added formatting
This commit is contained in:
@@ -8,39 +8,41 @@
|
||||
* @file valve.h
|
||||
* @brief API for controlling the motorized valve.
|
||||
*
|
||||
* This library provides functions to initialize, open, close, and stop the valve.
|
||||
* It also allows getting the valve's state and movement status, and configuring
|
||||
* the maximum opening and closing times.
|
||||
* This library provides functions to initialize, open, close, and stop the
|
||||
* valve. It also allows getting the valve's state and movement status, and
|
||||
* configuring the maximum opening and closing times.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Defines the GPIO pins used for the valve controller.
|
||||
*/
|
||||
struct valve_gpios {
|
||||
const struct gpio_dt_spec in0; /**< Control input 0 for the VND7050AJ driver. */
|
||||
const struct gpio_dt_spec in1; /**< Control input 1 for the VND7050AJ driver. */
|
||||
const struct gpio_dt_spec rst; /**< Reset pin for the VND7050AJ driver. */
|
||||
const struct gpio_dt_spec sen; /**< Sense (current measurement) pin. */
|
||||
const struct gpio_dt_spec s0; /**< S0 select pin. */
|
||||
const struct gpio_dt_spec s1; /**< S1 select pin. */
|
||||
const struct gpio_dt_spec
|
||||
in0; /**< Control input 0 for the VND7050AJ driver. */
|
||||
const struct gpio_dt_spec
|
||||
in1; /**< Control input 1 for the VND7050AJ driver. */
|
||||
const struct gpio_dt_spec rst; /**< Reset pin for the VND7050AJ driver. */
|
||||
const struct gpio_dt_spec sen; /**< Sense (current measurement) pin. */
|
||||
const struct gpio_dt_spec s0; /**< S0 select pin. */
|
||||
const struct gpio_dt_spec s1; /**< S1 select pin. */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Represents the static state of the valve (open or closed).
|
||||
*/
|
||||
enum valve_state {
|
||||
VALVE_STATE_CLOSED, /**< The valve is fully closed. */
|
||||
VALVE_STATE_OPEN, /**< The valve is fully open. */
|
||||
VALVE_STATE_CLOSED, /**< The valve is fully closed. */
|
||||
VALVE_STATE_OPEN, /**< The valve is fully open. */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Represents the dynamic movement status of the valve.
|
||||
*/
|
||||
enum valve_movement {
|
||||
VALVE_MOVEMENT_IDLE, /**< The valve is not moving. */
|
||||
VALVE_MOVEMENT_OPENING, /**< The valve is currently opening. */
|
||||
VALVE_MOVEMENT_CLOSING, /**< The valve is currently closing. */
|
||||
VALVE_MOVEMENT_ERROR /**< An error occurred during movement. */
|
||||
VALVE_MOVEMENT_IDLE, /**< The valve is not moving. */
|
||||
VALVE_MOVEMENT_OPENING, /**< The valve is currently opening. */
|
||||
VALVE_MOVEMENT_CLOSING, /**< The valve is currently closing. */
|
||||
VALVE_MOVEMENT_ERROR /**< An error occurred during movement. */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -118,4 +120,4 @@ uint16_t valve_get_max_open_time(void);
|
||||
*/
|
||||
uint16_t valve_get_max_close_time(void);
|
||||
|
||||
#endif // VALVE_H
|
||||
#endif // VALVE_H
|
||||
|
||||
Reference in New Issue
Block a user