ESP-LiveControl  1.99.1
HTTP server, AJAX API backend and Vue.js web application implementing self-contained, zero-install WiFi remote control of hardware modules attached to the Espressif ESP32 SoC
aux_hw_drv.hpp
Go to the documentation of this file.
1 
7 #ifndef APP_HW_DRV_HPP__
8 #define APP_HW_DRV_HPP__
9 
10 #include "freertos/FreeRTOS.h"
11 #include "freertos/timers.h"
12 #include "driver/ledc.h"
13 #include "driver/gpio.h"
14 #include "esp_err.h"
15 
16 #include "sensor_kty81_1xx.hpp"
17 
18 #include "app_state_model.hpp"
19 
31 class AuxHwDrv
32 {
33 public:
34  static constexpr auto aux_hw_conf = AuxHwDrvConfig{};
35  AuxHwDrvState state;
36  SensorKTY81_121 sensor_temp_1{aux_hw_conf.temp_ch_1};
37  SensorKTY81_121 sensor_temp_2{aux_hw_conf.temp_ch_2};
38 
39  AuxHwDrv();
40  virtual ~AuxHwDrv();
41 
42  void set_current_limit(float value);
43  void set_relay_ref_active(bool state);
44  void set_relay_dut_active(bool state);
45  void set_fan_active(bool state);
46  void set_fan_override(bool new_state);
47  void set_drv_supply_active(bool state);
48  void set_drv_disabled(bool state);
49  static void reset_oc_shutdown_start();
50  static void reset_oc_shutdown_finish();
51 
56 
63 
64 private:
65 
66 };
67 
68 #endif
Auxiliary hardware driver for ESP-AJAX-Lab This implements GPIO control for relays,...
Definition: aux_hw_drv.hpp:32
void evaluate_temperature_sensors()
Check if temperature exceeds threshold value and switch fan accordingly.
Definition: aux_hw_drv.cpp:131
void update_temperature_sensors()
Only updates the state structure for temperature sensors. Other state variables are only modified by ...
Definition: aux_hw_drv.cpp:119
KTY81-121 type silicon temperature sensor readout using the ESP32 ADC in its high-linearity region.
Definition: sensor_kty81_1xx.hpp:160
Hardware configuration for AuxHwDrv.
Definition: app_config.hpp:191
Definition: app_state_model.hpp:23