coffee/barista/thermostat.h
2025-11-02 19:24:02 +01:00

33 lines
618 B
C

/* Copyright (c) 2025 Rodrigo Arias Mallo <rodarima@gmail.com>
* SPDX-License-Identifier: GPL-3.0-or-later */
#ifndef BARISTA_THERMOSTAT_H
#define BARISTA_THERMOSTAT_H
#ifdef __cplusplus
extern "C" {
#endif
enum thermostat_state {
THERMOSTAT_OFF = 0,
THERMOSTAT_ON,
};
struct thermostat {
enum thermostat_state st;
float temp_target;
float temp_min;
float temp_max;
int on;
};
void thermostat_set(struct thermostat *th, float temp_target);
void thermostat_off(struct thermostat *th);
int thermostat_state(struct thermostat *th, float temp);
#ifdef __cplusplus
}
#endif
#endif /* BARISTA_THERMOSTAT_H */