mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-17 13:22:53 +01:00
check psram on self test (#628)
This commit is contained in:
parent
8605bb4fb0
commit
1ea422f441
@ -44,6 +44,7 @@ PRIV_REQUIRES
|
||||
"esp_event"
|
||||
"esp_http_server"
|
||||
"esp_netif"
|
||||
"esp_psram"
|
||||
"esp_timer"
|
||||
"esp_wifi"
|
||||
"json"
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "vcore.h"
|
||||
#include "utils.h"
|
||||
#include "TPS546.h"
|
||||
#include "esp_psram.h"
|
||||
|
||||
#define GPIO_ASIC_ENABLE CONFIG_GPIO_ASIC_ENABLE
|
||||
|
||||
@ -288,6 +289,15 @@ esp_err_t test_init_peripherals(GlobalState * GLOBAL_STATE) {
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t test_psram(GlobalState * GLOBAL_STATE){
|
||||
if(!esp_psram_is_initialized()) {
|
||||
ESP_LOGE(TAG, "No PSRAM available on ESP32!");
|
||||
display_msg("PSRAM:FAIL", GLOBAL_STATE);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Perform a self-test of the system.
|
||||
*
|
||||
@ -304,6 +314,12 @@ void self_test(void * pvParameters)
|
||||
|
||||
GLOBAL_STATE->SELF_TEST_MODULE.active = true;
|
||||
|
||||
//Run PSRAM test
|
||||
if(test_psram(GLOBAL_STATE) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "NO PSRAM on device!");
|
||||
tests_done(GLOBAL_STATE, TESTS_FAILED);
|
||||
}
|
||||
|
||||
//Run display tests
|
||||
if (test_display(GLOBAL_STATE) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Display test failed!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user