add power management (disabled because then usb serial won't work)

This commit is contained in:
2025-03-02 22:05:45 +01:00
parent de9d88c5ed
commit b86fcbd570

View File

@@ -7,6 +7,7 @@
#include <cstdint>
#include <disp_tools.hpp>
#include <disp_tty.hpp>
#include <esp_pm.h>
#include <inttypes.h>
#include <stdio.h>
#include "esp_chip_info.h"
@@ -30,6 +31,9 @@
FbTty tty;
extern "C" void app_main() {
// esp_pm_config_t pm_config = {
// .max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, .min_freq_mhz = 16, .light_sleep_enable = true};
// ESP_ERROR_CHECK(esp_pm_configure(&pm_config));
printf("Hello world!\n");
i2c_global::init();
BatMon::init();
@@ -43,7 +47,7 @@ extern "C" void app_main() {
tty.putstr("Hello\nworld!");
disp_tools::draw_to_display();
while (true){
while (true) {
// SMD::clear();
// printf("Voltage: %f\n", BatMon::get_voltage());
tty.fmt("Current: {}\n", BatMon::get_current());