feat: refactor header files and add info for psram
This commit is contained in:
@@ -1,4 +1,10 @@
|
|||||||
#include "info/info.h"
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "freertos/task.h"
|
||||||
|
#include "esp_system.h"
|
||||||
|
|
||||||
typedef void (*shutdown_display_handlerFunc)(void);
|
typedef void (*shutdown_display_handlerFunc)(void);
|
||||||
typedef void (*restart_display_handlerFunc)(void);
|
typedef void (*restart_display_handlerFunc)(void);
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "freertos/task.h"
|
||||||
|
#include "esp_chip_info.h"
|
||||||
|
#include "esp_flash.h"
|
||||||
|
#include "esp_system.h"
|
||||||
|
#include "esp_psram.h"
|
||||||
#include "info.h"
|
#include "info.h"
|
||||||
|
|
||||||
void display_chip_info() {
|
void display_chip_info() {
|
||||||
@@ -6,13 +15,15 @@ void display_chip_info() {
|
|||||||
esp_chip_info_t chip_info;
|
esp_chip_info_t chip_info;
|
||||||
uint32_t flash_size;
|
uint32_t flash_size;
|
||||||
esp_chip_info(&chip_info);
|
esp_chip_info(&chip_info);
|
||||||
printf("This is %s chip with %d CPU core(s), %s%s%s%s, ",
|
printf("This is %s chip with %d CPU core(s), %s%s%s%s%s, ",
|
||||||
CONFIG_IDF_TARGET,
|
CONFIG_IDF_TARGET,
|
||||||
chip_info.cores,
|
chip_info.cores,
|
||||||
(chip_info.features & CHIP_FEATURE_WIFI_BGN) ? "WiFi/" : "",
|
(chip_info.features & CHIP_FEATURE_WIFI_BGN) ? "WiFi/" : "",
|
||||||
(chip_info.features & CHIP_FEATURE_BT) ? "BT" : "",
|
(chip_info.features & CHIP_FEATURE_BT) ? "BT" : "",
|
||||||
(chip_info.features & CHIP_FEATURE_BLE) ? "BLE" : "",
|
(chip_info.features & CHIP_FEATURE_BLE) ? "BLE" : "",
|
||||||
(chip_info.features & CHIP_FEATURE_IEEE802154) ? ", 802.15.4 (Zigbee/Thread)" : "");
|
(chip_info.features & CHIP_FEATURE_IEEE802154) ? ", 802.15.4 (Zigbee/Thread), " : "",
|
||||||
|
// psram
|
||||||
|
(chip_info.features & CHIP_FEATURE_EMB_PSRAM) ? "with embedded PSRAM, " : "");
|
||||||
|
|
||||||
unsigned major_rev = chip_info.revision / 100;
|
unsigned major_rev = chip_info.revision / 100;
|
||||||
unsigned minor_rev = chip_info.revision % 100;
|
unsigned minor_rev = chip_info.revision % 100;
|
||||||
@@ -26,5 +37,7 @@ void display_chip_info() {
|
|||||||
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");
|
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");
|
||||||
|
|
||||||
printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size());
|
printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size());
|
||||||
|
// psram
|
||||||
|
printf("PSRAM size: %u bytes\n", esp_psram_get_size());
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include "sdkconfig.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "freertos/task.h"
|
|
||||||
#include "esp_chip_info.h"
|
|
||||||
#include "esp_flash.h"
|
|
||||||
#include "esp_system.h"
|
|
||||||
|
|
||||||
void display_chip_info();
|
void display_chip_info();
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
#include "info/info.h"
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "freertos/task.h"
|
||||||
|
#include "esp_system.h"
|
||||||
|
|
||||||
class TouchHandler {
|
class TouchHandler {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user