drivers/opt3001 : Expose Configurations to Kconfig #13934
Merged
leandrolanzieri merged 3 commits intoRIOT-OS:masterfrom Apr 27, 2020
Merged
drivers/opt3001 : Expose Configurations to Kconfig #13934leandrolanzieri merged 3 commits intoRIOT-OS:masterfrom
leandrolanzieri merged 3 commits intoRIOT-OS:masterfrom
Conversation
71 tasks
Contributor
leandrolanzieri
left a comment
There was a problem hiding this comment.
Looks good. Just minor doc comments
Member
Author
Thanks for the comments |
Contributor
|
@akshaim please squash |
Add CONFIG_ prefix to compile time configurations
Define choices for macros.
Expose configurable parameters to Kconfig Co-Authored-By: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
d9b48ee to
f796664
Compare
Member
Author
Done. Thanks for the comments |
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.
Contribution description
This PR exposes compile configurations in OPT3001 Sensor Device driver to Kconfig.
Testing procedure
New macro was introduced in tests/driver_opt3001/main.c for testing.
Firmware was uploaded to FIT IoT Lab test bed.
Default State:
Firmware Output
main(): This is RIOT! (Version: 2020.07-devel-185-g2e649-Kconfig_opt3001)
CONFIG_OPT3001_I2C_ADDRESS=(0x45)
CONFIG_OPT3001_CONVERSION_TIME=(0x0800)
OPT3001 test application
Initializing OPT3001 sensor at I2C_0 ... opt3001_init: Error reading device ID!
init device [ERROR]
Usage with CFLAGS
/tests/driver_opt3001/Makefile
Firmware Output
main(): This is RIOT! (Version: 2020.07-devel-185-g2e649-Kconfig_opt3001)
CONFIG_OPT3001_I2C_ADDRESS=(0x44)
CONFIG_OPT3001_CONVERSION_TIME=(0x0000)
OPT3001 test application
Initializing OPT3001 sensor at I2C_0 ... opt3001_init: Error reading device ID!
init device [ERROR]
Usage with Kconfig
/tests/driver_opt3001/
Firmware Output
main(): This is RIOT! (Version: 2020.07-devel-185-g2e649-Kconfig_opt3001)
CONFIG_OPT3001_I2C_ADDRESS=0x47
CONFIG_OPT3001_CONVERSION_TIME=(0x0000)
OPT3001 test application
Initializing OPT3001 sensor at I2C_0 ... opt3001_init: Error reading device ID!
init device [ERROR]
Note : The sensor is not available for interfacing hence configurability of macros were only tested.
Issues/PRs references
#12888
@leandrolanzieri