ChaosDMX
Open-Source DMX-Interface
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1#pragma once
2
3#include "esp_err.h"
4#include <stddef.h>
5#include <stdint.h>
6
10typedef struct {
11 const char *model_name;
12 uint8_t cores;
13 uint32_t revision;
15
21esp_err_t system_init(void);
22
28float system_get_temperature(void);
29
35
40uint32_t system_get_free_heap(void);
41
47uint32_t system_get_min_free_heap(void);
48
54uint8_t system_get_cpu_usage(void);
55
68void system_get_tasks_list(char *buffer, size_t buffer_len);
69
76const char *system_get_version(void);
77
82int64_t system_get_uptime_ms(void);
83
89
96
103void system_print_info(void);
Structure to hold static chip configuration details.
Definition system.h:10
uint8_t cores
Definition system.h:12
const char * model_name
Definition system.h:11
uint32_t revision
Definition system.h:13
int system_get_reset_reason(void)
Gets the reason for the last system reset.
Definition system.c:122
void system_get_tasks_list(char *buffer, size_t buffer_len)
Formats raw FreeRTOS statistics into a human-readable task list. Requires CONFIG_FREERTOS_USE_STATS_F...
Definition system.c:106
void system_get_chip_info(sys_chip_info_t *chip_info)
Retrieves static chip hardware information.
Definition system.c:124
const char * system_get_version(void)
Gets the active firmware build version. Matches the Git commit short hash (appends '-d' if local modi...
Definition system.c:118
uint32_t system_get_min_free_heap(void)
Gets the minimum ever free heap size since boot (watermark). This is crucial for detecting close-to-O...
Definition system.c:71
esp_err_t system_init(void)
Initializes the system monitoring component. Sets up the internal temperature sensor and tracks initi...
Definition system.c:27
uint32_t system_get_free_heap(void)
Gets the current available free heap size (RAM).
Definition system.c:69
void system_print_info(void)
Prints a complete, formatted overview of all system statistics to the console. Internally uses ESP_LO...
Definition system.c:162
float system_get_temperature(void)
Gets the current internal CPU temperature.
Definition system.c:50
uint8_t system_get_cpu_usage(void)
Calculates the total real-time CPU utilization. Requires CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS to b...
Definition system.c:75
int64_t system_get_uptime_ms(void)
Gets the system uptime since boot.
Definition system.c:120
float system_get_max_temperature(void)
Gets the highest recorded CPU temperature since boot.
Definition system.c:64