Files
MSE-PI-E2EEDA-Plein-de-eeee…/nodes/src/window_status.h
2026-06-04 21:01:42 +02:00

32 lines
1013 B
C

#ifndef WINDOW_STATUS_H
#define WINDOW_STATUS_H
#include <zephyr/drivers/gpio.h>
#include "error_code.h"
enum window_status{
closed = 0, // window is closed or sensor is not connected
open, // window is opened
unknown, // window opening status could not be read
windows_status_last, // iteration purpose
};
/**
* @brief init the window opening status module
* @return init_failed upon any error during init
* @return success otherwise
*/
enum error_code window_init();
/**
* @brief Retrieve the window opening status and stores it in the given parameter
* @param[out] holder : pointer where the measurement will be stored
* @return read_failed upon any error occuring during measurement
* @return success otherwise
* @note the content of holder should not be trusted upon returning something else than success
*/
enum error_code window_get_value(enum window_status* holder);
#endif //WINDOW_STATUS_