boards/esp32: changes the approach for configurations of I2C in board definitions#11291
Conversation
|
I will add it to the list but it will require some testing since it is a structure change and not just a cleanup. |
|
@MrKevinWeiss Thanks 😄 Sorry, for so many new PRs. Initally, they all were part of the single PR #10644 but splitted now into a separate PR for each peripheral by request from @leandrolanzieri for easier reviewing. In case of I2C, I have tested it with without any problems. Please, don't wonder about the changes of GPIO definitions in |
That is a good thing! I will rerun it through the RF tests to be sure (they have negative testing). Just need a bit of time to setup. |
MrKevinWeiss
left a comment
There was a problem hiding this comment.
I would say it looks good. I also tested it and it appears to work (just manually against PHiLIP). There are wrong error codes but that isn't related to this PR and I will soon add a test to expose that so don't worry about it now. I will ACK.
|
I will let @leandrolanzieri coordinate the merging. |
0cdbecc to
b3116e7
Compare
I2C devices are now configured using static array in header files instead of static variables in implementation to be able to define I2C_NUMOF using the size of the array instead of a variable.
I2C devices are now configured using static array in header files instead of static variables in implementation to be able to define I2C_NUMOF using the size of the array instead of a variable.
b3116e7 to
6a3bc3e
Compare
MrKevinWeiss
left a comment
There was a problem hiding this comment.
Quick retests against philip (flashing, reading and writing registers). Seems good. ACK!
|
@MrKevinWeiss Thanks a lot for testing and reviewing it again 😄 |
Contribution description
This PR changes the approach of peripheral configurations for I2C in board definitions to the usual RIOT approach. With these changes, peripheral configurations use static const arrays in the
boards/esp32*/periph_conf.hfiles and define the*_NUMOFmacros using the size of these static array.The static configuration arrays contain only definitions that can be changed by the board definition or the application. They do not contain any MCU implementation detail. The board definitions use preprocessor defines as before to fill these static configuration arrays. This makes it possible to override all configurations either with the make command or application specific configuration files.
Please note that commit 8b48dfd is in also in related PRs to get each PR compilable separately.
Testing procedure
Compilation and test with the most common ESP32 board should be executed
Issues/PRs references
PRs #11289 #11290 #11291 #11292 #11293 #11294 are releated and should be merged together.