feat(refactor): Restructure project for improved modularity and clarity
This commit introduces a major refactoring of the project structure to align with Zephyr's recommended multi-application and library organization. Key changes include: - Relocation of custom modules from 'software/modules/' to 'software/lib/'. - Introduction of a central 'software/CMakeLists.txt' to manage application and library subdirectories. - Creation of new Kconfig files for 'software/' and 'software/apps/slave_node/' to define project-wide and application-specific configurations. - Removal of the 'gateway' and 'stm32g431_tests' applications. - Removal of 'shell_modbus.c' and 'shell_system.c' from 'slave_node' application's direct source files, indicating a shift towards library-based shell commands. - Updates to 'software/apps/slave_node/CMakeLists.txt', 'prj.conf', and 'boards/bluepill_f103rb.conf' to reflect the new structure and dependencies.
This commit is contained in:
23
software/include/lib/valve.h
Normal file
23
software/include/lib/valve.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef VALVE_H
|
||||
#define VALVE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum valve_state { VALVE_STATE_CLOSED, VALVE_STATE_OPEN };
|
||||
enum valve_movement { VALVE_MOVEMENT_IDLE, VALVE_MOVEMENT_OPENING, VALVE_MOVEMENT_CLOSING, VALVE_MOVEMENT_ERROR };
|
||||
|
||||
void valve_init(void);
|
||||
void valve_open(void);
|
||||
void valve_close(void);
|
||||
void valve_stop(void);
|
||||
|
||||
enum valve_state valve_get_state(void);
|
||||
enum valve_movement valve_get_movement(void);
|
||||
uint16_t valve_get_motor_current(void);
|
||||
|
||||
void valve_set_max_open_time(uint16_t seconds);
|
||||
void valve_set_max_close_time(uint16_t seconds);
|
||||
uint16_t valve_get_max_open_time(void);
|
||||
uint16_t valve_get_max_close_time(void);
|
||||
|
||||
#endif // VALVE_H
|
||||
Reference in New Issue
Block a user