Skip to content

Commit

Permalink
move ADC_init() before start_http_server() because the UI reads the ADC
Browse files Browse the repository at this point in the history
  • Loading branch information
skot committed Oct 8, 2024
1 parent 2c13f23 commit 4aa1d88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down
1 change: 0 additions & 1 deletion main/vcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ uint8_t VCORE_init(GlobalState * global_state) {
// case DEVICE_HEX:
default:
}
ADC_init();
return result;
}

Expand Down

0 comments on commit 4aa1d88

Please sign in to comment.