diff --git a/main/main.c b/main/main.c index 0d6e5159..8720e18a 100644 --- a/main/main.c +++ b/main/main.c @@ -17,6 +17,7 @@ #include "stratum_task.h" #include "user_input_task.h" #include "i2c_bitaxe.h" +#include "adc.h" static GlobalState GLOBAL_STATE = { .extranonce_str = NULL, @@ -40,6 +41,9 @@ void app_main(void) //wait for I2C to init vTaskDelay(100 / portTICK_PERIOD_MS); + //Init ADC + ADC_init(); + ESP_ERROR_CHECK(nvs_flash_init()); GLOBAL_STATE.POWER_MANAGEMENT_MODULE.frequency_value = nvs_config_get_u16(NVS_CONFIG_ASIC_FREQ, CONFIG_ASIC_FREQUENCY); diff --git a/main/vcore.c b/main/vcore.c index f91dec19..71cd18af 100644 --- a/main/vcore.c +++ b/main/vcore.c @@ -37,7 +37,6 @@ uint8_t VCORE_init(GlobalState * global_state) { // case DEVICE_HEX: default: } - ADC_init(); return result; }