1-phase PV router
|
Functions and classes responsible for system setup and configuration. More...
Functions | |
constexpr uint16_t | getInputPins () |
Retrieves the input pins configuration. | |
constexpr uint16_t | getOutputPins () |
Retrieves the output pins configuration. | |
void | initializeOldPCBPins () |
Initializes optional pins for the old PCB configuration. | |
void | initializeProcessing () |
Initializes the processing engine, including ports, load states, and ADC setup. | |
void | printConfiguration () |
Print the configuration 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.
|
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 177 of file processing.cpp.
References bit_read(), bit_set(), DIVERSION_PIN_PRESENT, diversionPin, DUAL_TARIFF, dualTariffPin, forcePin, OVERRIDE_PIN_PRESENT, PIN, and rotationPin.
Referenced by initializeProcessing().
|
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 126 of file processing.cpp.
References bit_read(), bit_set(), physicalLoadPin, RELAY_DIVERSION, relays, WATCHDOG_PIN_PRESENT, and watchDogPin.
Referenced by initializeProcessing().
void initializeOldPCBPins | ( | ) |
Initializes optional pins for the old PCB configuration.
This function configures various optional pins based on the hardware setup and feature flags. It ensures that the pins are properly initialized for their respective purposes, such as dual tariff, override, priority rotation, diversion, relay diversion, and watchdog functionality.
Definition at line 1277 of file processing.cpp.
References DIVERSION_PIN_PRESENT, diversionPin, DUAL_TARIFF, dualTariffPin, forcePin, i, loadPrioritiesAndState, loadPrioritiesAtStartup, loadStateMask, NO_OF_DUMPLOADS, OVERRIDE_PIN_PRESENT, physicalLoadPin, PIN, RELAY_DIVERSION, relays, rotationPin, setPinOFF(), updatePhysicalLoadStates(), updatePortsStates(), WATCHDOG_PIN_PRESENT, and watchDogPin.
Referenced by initializeProcessing().
void initializeProcessing | ( | ) |
Initializes the processing engine, including ports, load states, and ADC setup.
This function performs the following tasks:
Definition at line 229 of file processing.cpp.
References bit_clear(), bit_set(), getInputPins(), getOutputPins(), i, initializeOldPCBPins(), loadPrioritiesAndState, loadPrioritiesAtStartup, loadStateMask, NO_OF_DUMPLOADS, OLD_PCB, setPinsAsInputPullup(), and setPinsAsOutput().
Referenced by setup().
|
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 55 of file utils.h.
References ANTI_CREEP_LIMIT, BRANCH_NAME, COMMIT_HASH, CURRENT_TIME, DBUG, DBUGLN, HumanReadable, IoT, JSON, powerCal_diverted, powerCal_grid, printParamsForSelectedOutputMode(), PROJECT_PATH, REQUIRED_EXPORT_IN_WATTS, and SERIAL_OUTPUT_TYPE.
Referenced by setup().