You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the problem. There are several solutions using the existing codebase. Here's the simplest one: use the split_pin_names function (introduced in version 1.0.0). If your microcontroller is in a part named mcu, then you can split all the pin names using underscore as the delimiter like so:
mcu.split_pin_names('_')
After that, each pin named GPIOXX_ADCYY will have additional aliases GPIOXX and ADCYY. Then you can access them using mcu['ADC[1:4]'] or mcu['GPIO[26:29]'].
This may cause some problems if you have other pins with underscore-separated names like DO_NOT_USE which would create pin aliases of DO, NOT and USE that may collide across multiple pins. If that's a problem, we'll think of a work-around.
Would be useful to fetch pins in buses that contain multiple numbers slices. For example:
new_bus = Bus('GPIO[26:29]_ADC[0:3]')
The text was updated successfully, but these errors were encountered: