DcBus and PowerPort become struct dc_bus and struct power_port with prefixed functions instead of member functions. The default member initializers are replaced by dc_bus_init() and power_port_init(). The only non-zero default value is the series multiplier of the bus, which is set to 1 by dc_bus_init() and in the static initializers of the global buses. The optional voltage parameter of the control voltage functions has to be passed explicitly now, 0 still selects the voltage intercept of the bus. LoadOutput and PwmSwitch still inherit from the C struct until they are converted, and initialize it with power_port_init(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
773 B
CMake
32 lines
773 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_include_directories(.)
|
|
|
|
target_sources(app PRIVATE
|
|
bat_charger.cpp
|
|
daq.cpp
|
|
device_status.cpp
|
|
dcdc.cpp
|
|
hardware.cpp
|
|
leds.cpp
|
|
load.cpp
|
|
main.cpp
|
|
power_port.c
|
|
pwm_switch.cpp
|
|
setup.cpp
|
|
)
|
|
|
|
target_sources_ifdef(CONFIG_UEXT_OLED_DISPLAY app PRIVATE oled.cpp oled_font.c)
|
|
|
|
if(${CONFIG_CUSTOM_DATA_OBJECTS_FILE})
|
|
target_sources(app PRIVATE data_objects_custom.cpp)
|
|
else()
|
|
target_sources(app PRIVATE data_objects.cpp)
|
|
endif()
|
|
|
|
# Using this option enables user-specific customization of the firmware. The
|
|
# custom subfolder should have its own CMakeLists.txt file.
|
|
if(${CONFIG_CUSTOMIZATION})
|
|
add_subdirectory(custom build/custom)
|
|
endif()
|