sys/config: Add static conf handlers support#3628
Open
kasjer wants to merge 4 commits intoapache:masterfrom
Open
sys/config: Add static conf handlers support#3628kasjer wants to merge 4 commits intoapache:masterfrom
kasjer wants to merge 4 commits intoapache:masterfrom
Conversation
So far conf_handlers could be registered at run time. This approach delays loading of configuration till application start processing events. This limits what can be configured in config. Now system supports static configuration, conf_handler can be put in link time table so conf_handler is ready from the very start and configuration can be loaded earlier. CONFIG_AUTO_LOAD syscfg value allows to load configuration during initialization of config subsystem as static handlers are already in place. Dynamic handlers are still supported while discuraged. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Now conf_handler is statically registerd at build time. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Now id_conf handler is statically registered at build time. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
3280fec to
0539e55
Compare
Now MAC address can be configured in sys/config instead of syscfg. Additionally eth link can be brough up at startup. DHCP can also be started atuomatically so when application code starts network is already correctly initialized. STM32_ETH_MAC_ADDR syscfg value can be used for specifying MAC address, STM32_MAC_ADDR is now defunct (name was inconsistent with other values and syntax was limiting how value can be used) STM32_ETH_AUTO_UP syscfg value allows to set link up during startup. STM32_ETH_DHCP syscfg value allows to start DHCP automatically. When STM32_ETH_SYS_CONFIG syscfg value is 1 configuration is taken from sys/config instead of syscfg.yml Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
0539e55 to
d37215a
Compare
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.
So far conf_handlers could be registered at run time.
This approach delays loading of configuration till
application start processing events.
This limits what can be configured in config.
Now system supports static configuration,
conf_handler can be put in link time table
so conf_handler is ready from the very start
and configuration can be loaded earlier.
CONFIG_AUTO_LOAD syscfg value allows to load
configuration during initialization of config
subsystem as static handlers are already in place.
Dynamic handlers are still supported while discuraged.
sys/id nad sys/fault packages are converted to use static registration
stm32_eth now support configuration via sys/config as an example
how to use it