mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-04-01 00:18:34 +02:00
* fix ASIC not starting - order is important * Revert "fix ASIC not starting - order is important" This reverts commit c313a6f3e7a54e02a6b43315f641c44fcab051d2. * better approach resolving race condition in serial communication; moving serial from ASIC_task / ASIC_result_task to app_main()
This commit is contained in:
parent
afd4a30985
commit
ec4af81479
@ -138,6 +138,8 @@ void app_main(void)
|
||||
|
||||
SERIAL_init();
|
||||
(*GLOBAL_STATE.ASIC_functions.init_fn)(GLOBAL_STATE.POWER_MANAGEMENT_MODULE.frequency_value);
|
||||
SERIAL_set_baud((*GLOBAL_STATE.ASIC_functions.set_max_baud_fn)());
|
||||
SERIAL_clear_buffer();
|
||||
|
||||
xTaskCreate(stratum_task, "stratum admin", 8192, (void *) &GLOBAL_STATE, 5, NULL);
|
||||
xTaskCreate(create_jobs_task, "stratum miner", 8192, (void *) &GLOBAL_STATE, 10, NULL);
|
||||
|
@ -12,7 +12,6 @@ const char *TAG = "asic_result";
|
||||
void ASIC_result_task(void *pvParameters)
|
||||
{
|
||||
GlobalState *GLOBAL_STATE = (GlobalState *)pvParameters;
|
||||
SERIAL_clear_buffer();
|
||||
|
||||
char *user = nvs_config_get_string(NVS_CONFIG_STRATUM_USER, STRATUM_USER);
|
||||
|
||||
|
@ -25,10 +25,6 @@ void ASIC_task(void *pvParameters)
|
||||
GLOBAL_STATE->valid_jobs[i] = 0;
|
||||
}
|
||||
|
||||
int baud = (*GLOBAL_STATE->ASIC_functions.set_max_baud_fn)();
|
||||
vTaskDelay(10 / portTICK_PERIOD_MS);
|
||||
SERIAL_set_baud(baud);
|
||||
|
||||
SYSTEM_notify_mining_started(&GLOBAL_STATE->SYSTEM_MODULE);
|
||||
ESP_LOGI(TAG, "ASIC Ready!");
|
||||
while (1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user