feat(slave): Implement VND7050AJ and core valve functionality; docs: Update German documentation and project plan
- Updated Doxygen comments in header files (valve.h, fwu.h, modbus_server.h) to be consistent and in English. - Translated German register names in docs/modbus-registers.de.md to English. - Updated docs/concept.de.md to reflect new details on current measurement and sensors. - Updated docs/planning.de.md to reflect completed tasks in Phase 1. - Implemented VND7050AJ and core functionality including current and voltage measurement and end-position detection.
This commit is contained in:
@@ -13,19 +13,9 @@
|
||||
* 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. */
|
||||
};
|
||||
#define VALVE_CHANNEL_OPEN 0
|
||||
#define VALVE_CHANNEL_CLOSE 1
|
||||
#define VALVE_ENDPOSITION_CHECK_INTERVAL K_MSEC(100)
|
||||
|
||||
/**
|
||||
* @brief Represents the static state of the valve (open or closed).
|
||||
@@ -49,8 +39,11 @@ enum valve_movement {
|
||||
* @brief Initializes the valve control system.
|
||||
*
|
||||
* Configures the GPIOs and loads saved settings for timeouts.
|
||||
* This function must be called before any other valve functions.
|
||||
*
|
||||
* @return 0 on success, or a negative error code on failure.
|
||||
*/
|
||||
void valve_init(void);
|
||||
int valve_init(void);
|
||||
|
||||
/**
|
||||
* @brief Starts opening the valve.
|
||||
@@ -120,4 +113,31 @@ uint16_t valve_get_max_open_time(void);
|
||||
*/
|
||||
uint16_t valve_get_max_close_time(void);
|
||||
|
||||
/**
|
||||
* @brief Gets the current drawn by the valve motor during opening.
|
||||
*
|
||||
* @return The motor current in milliamps.
|
||||
*/
|
||||
int32_t valve_get_opening_current(void);
|
||||
|
||||
/**
|
||||
* @brief Gets the current drawn by the valve motor during closing.
|
||||
*
|
||||
* @return The motor current in milliamps.
|
||||
*/
|
||||
int32_t valve_get_closing_current(void);
|
||||
|
||||
/**
|
||||
* @brief Gets the temperature of the valve motor driver.
|
||||
*
|
||||
* @return The temperature in degrees Celsius.
|
||||
*/
|
||||
int32_t valve_get_vnd_temp(void);
|
||||
|
||||
/**
|
||||
* @brief Gets the voltage supplied to the valve motor driver.
|
||||
*
|
||||
* @return The voltage in millivolts.
|
||||
*/
|
||||
int32_t valve_get_vnd_voltage(void);
|
||||
#endif // VALVE_H
|
||||
|
||||
Reference in New Issue
Block a user