Rolerework with python script #1826
Open
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.
Use a single text file to combine all information about roles and channels.
Actually we have information in this files:
new_pins.h
new_pins.c
new_http.c
... and maybe in http_fns.c if we want to add some information about channel usage.
This approach will put all in a file with this entries
You can see, I added some more "//iodetails"-fields containing all information we might need:
- the number of channels an ioRole needs
- descriptions, what channels are used for
- a "define" so we can see, which #define will enable the driver for this role
This gives
one place to hold (and extend) all information
some additional information which allows us
to add information about channel usage
to "hide" all roles, which can't be used in the FW because the driver is not present
I think it will be clearer if I can e.g. select the role SHTX only, if the driver is present.
As a side effect, I can squeeze the image a bit - missing roles don't need a description text!
Since we already use python in Makefile, I changed the original used "awk-script" ( #1773 ) to a python one.
This is the release W800 page (you see, not all IORoles will fit the page, there are quite some more missing of all 87 roles)

The same page with this PR
If you set
#define ENABLE_USE_PINROLE_CHAN_DESC 1
You can see some ideas what else is possible: