Refactor slave_node application to use Zephyr modules
This commit is contained in:
23
software/modules/valve/include/valve.h
Normal file
23
software/modules/valve/include/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