refactor: unify the espfoc inverter driver to make pwm and adc codes integrated.#44
Open
uLipe wants to merge 11 commits into
Open
refactor: unify the espfoc inverter driver to make pwm and adc codes integrated.#44uLipe wants to merge 11 commits into
uLipe wants to merge 11 commits into
Conversation
Drop ESPF capture, stream bridges, host GUI, and related Kconfig/CI/docs so bring-up relies on the console shell and external tools such as MCU Viewer.
Replace separate inverter, isensor, and rotor_sensor vtables with one inverter handle (PWM + shunt) and encoder factories by driver type.
Add esp_foc_inverter_mcpwm factories, internal isensor_adc, and MCPWM comparator-triggered sampling; rename rotor drivers to esp_foc_encoder. Drop ESP32-S2 ADC support from the build.
Axis init takes inverter plus encoder only; current sense flows through the inverter vtable. FITL exposes two handles and drops scope hooks.
Refresh mocks and FITL integration tests, migrate examples to esp_foc_inverter_mcpwm factories, and document the breaking API change.
Each supported target gets a self-contained source/drivers/inverter/<soc>/ folder (PWM, ADC, DMA, ETM, bundle); encoders live under encoder/<type>/. CMake selects the inverter tree at build time; the public factory header moves to include/espFoC/drivers/.
Drop CONFIG_ESP_FOC_TUNER_ENABLE axis magic, stale sdkconfig scope/tuner options, and rename esp_foc_calibration_axis_tuner_store to store_live for the shell persist command.
Migrate test apps to unified inverter/encoder includes, extend CI builds to esp32/esp32c6/esp32s3/esp32p4, and compile-check unit tests on all supported HW targets.
Use vTaskDelay(1) instead of esp_foc_sleep_ms/usleep so GPTimer ISRs keep firing under QEMU, and stop any prior GPTimer before re-arming.
Derived-driver _new() entry points belong under source/drivers/include so include/espFoC stays limited to the esp_foc_inverter_t interface.
Keeps derived-driver factories colocated with the inverter driver tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.