|
3-phase PV router
|
Functions and classes responsible for system setup and configuration. More...
Functions | |
| int | freeRam () |
| Get the available RAM during setup. | |
| constexpr uint16_t | getInputPins () |
| Retrieves the input pins configuration. | |
| constexpr uint16_t | getLoadPins () |
| The pins the loads drive: the local TRIACs, plus the status LED of each remote load. | |
| constexpr uint16_t | getOutputPins () |
| Retrieves the output pins configuration. | |
| template<typename T, size_t N> | |
| constexpr void | initializeArray (T(&array)[N], T value) |
| Initializes all elements of a given array to a specified value. | |
| void | initializeProcessing () |
| Initializes the processing engine, including ports, load states, and ADC setup. | |
| void | printConfiguration () |
| Print the configuration during startup. | |
| void | printParamsForSelectedOutputMode () |
| Print the settings used for the selected output mode. | |
| void | printRotationGroups () |
| Prints the rotation groups, as load numbers counted from 0 as in LOAD(n): "\tgroups { 0 1 2 } { 3 4 5 }". | |
| void | setup () |
| Called once during startup. | |
Functions and classes responsible for system setup and configuration.
This group includes functions and classes that handle the initialization of hardware components, system parameters, and other configurations required for the proper operation of the system.
|
inline |
Get the available RAM during setup.
This function calculates the amount of free RAM available in the system. It is useful for debugging and ensuring that the system has sufficient memory for proper operation.
Definition at line 681 of file utils.h.

|
constexpr |
Retrieves the input pins configuration.
This function determines which pins are configured as input pins based on the current hardware setup. It ensures that no pin is configured multiple times and handles special cases like the dual tariff, diversion, rotation, and force pins.
constexpr and can be evaluated at compile time. Definition at line 231 of file processing.cpp.

|
constexpr |
The pins the loads drive: the local TRIACs, plus the status LED of each remote load.
Definition at line 359 of file processing.cpp.

|
constexpr |
Retrieves the output pins configuration.
This function determines which pins are configured as output pins based on the current hardware setup. It ensures that no pin is configured multiple times and handles special cases like the watchdog pin.
constexpr and can be evaluated at compile time. Definition at line 174 of file processing.cpp.

|
constexpr |
Initializes all elements of a given array to a specified value.
This template function provides a type-safe and efficient way to initialize arrays of any type and size with a specific value. Being a constexpr function, it can be evaluated at compile time when all inputs are compile-time constants, or at runtime when needed.
This utility is particularly useful in embedded systems where:
| T | The type of the array elements (automatically deduced from the array) |
| N | The number of elements in the array (automatically deduced) |
| [in,out] | array | Reference to the array to be initialized. All elements will be overwritten with the specified value. |
| [in] | value | The value to assign to each element of the array. The type must be compatible with the array element type. |
constexpr, allowing compile-time evaluation when both the array and value are compile-time constants. When used with runtime values, it executes as a regular function.Definition at line 152 of file processing.cpp.

| void initializeProcessing | ( | ) |
Initializes the processing engine, including ports, load states, and ADC setup.
This function performs the following tasks:
Definition at line 296 of file processing.cpp.


|
inline |
Print the configuration during startup.
This function outputs the system configuration to the Serial output during startup. It includes details about the sketch, build information, electrical settings, and enabled features.
Definition at line 142 of file utils.h.


| void printParamsForSelectedOutputMode | ( | ) |
Print the settings used for the selected output mode.
This function displays the relevant configuration parameters for the currently selected output mode. It provides details about the energy bucket capacity, thresholds, and mode-specific settings.
Definition at line 1060 of file processing.cpp.


|
inline |
| void setup | ( | ) |
Called once during startup.
This function initializes the system, configures pins, and prints system configuration to the Serial Monitor. It also initializes optional features like temperature sensing and load priorities.
Definition at line 335 of file main.cpp.
