software:firmware
MakAir Firmware
cpu_load.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 // INCLUDES ===================================================================
11 
12 #include <stdint.h>
13 
14 // INITIALISATION =============================================================
15 
17 #define TIME_CPU_CYCLE_RESET 1000u
18 
19 // FUNCTIONS ==================================================================
20 
26 #define COUNT_IDLE_CYCLE idleCyclesCount++
27 
34 uint8_t readCpuLoadPercent(void);
35 
37 extern volatile uint32_t idleCyclesCount;
volatile uint32_t idleCyclesCount
Access to idleCyclesCount needed by the COUNT_IDLE_CYCLE macro.
Definition: cpu_load.cpp:22
uint8_t readCpuLoadPercent(void)
Get the value of the CPU load.
Definition: cpu_load.cpp:39