/* Configure interface board */
int interface_config(uint32_t uart);
+enum running_modes {
+ mode_heat = 'C', /* Normal heating */
+ mode_delay = 'D', /* Delayed heating */
+ mode_ext_disable = 'E', /* Forced heating disabled by external input */
+ mode_forced = 'F', /* Auto Forced heating */
+ mode_manual = 'M', /* Manual Forced heating */
+ mode_delayed_heat_prod = 'P', /* Paused forced heating */
+ mode_temp_OK = 'T', /* Max temperature reached */
+ mode_overvoltage = 'V', /* Overvoltage detected */
+ mode_overtemp = 'H', /* Mosfet over-temperature detected */
+ mode_water_critical = 'W', /* Water over-temperature limit reached */
+};
+
enum interface_modes {
- MODE_RUN = 0,
- MODE_CONFIG,
- MODE_DISPLAY,
+ MODE_RUN = 0,
+ MODE_CONFIG,
+ MODE_DISPLAY,
};
extern char line[];
uint8_t overvoltage = 0; /* Flag and counter. Used to create a delay when overvoltage is detected,
set to OVERVOLTAGE_PROTECTION_CYCLES and decreases to 0 */
-enum modes {
- mode_heat = 'C', /* Normal heating */
- mode_delay = 'D', /* Delayed heating */
- mode_ext_disable = 'E', /* Forced heating disabled by external input */
- mode_forced = 'F', /* Auto Forced heating */
- mode_manual = 'M', /* Manual Forced heating */
- mode_delayed_heat_prod = 'P', /* Paused forced heating */
- mode_temp_OK = 'T', /* Max temperature reached */
- mode_overvoltage = 'V', /* Overvoltage detected */
- mode_overtemp = 'H', /* Mosfet over-temperature detected */
-};
-
/* Current running mode */
volatile char mode = mode_heat;
volatile char old_mode = mode_heat;