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
Hello would it be possible to add a function for bulk setting of INPUT/OUTPUT of the GPIO? im currently using 5 of these and 80 lines of code is used up for just setting the direction of the GPIO, i mean its not really a bad thing, just to make the code cleaner to look at. Alternatively having a function to read/write register directly would also be good as i can do the bulk setting of gpio direction there.
Thanks ! :)
The text was updated successfully, but these errors were encountered:
Hi.
I'm also missing this feature, but I found a workaround. Fortunately, the pin argument in the function pinMode is an integer, and you can simply iterate over the whole port:
for (int8_t i = 0; i <= 15; i++) {
mcp.pinMode(i, INPUT);
}
The same applies for the interrupt:
for (int8_t i = 0; i <= 15; i++) {
mcp.setupInterruptPin(i, CHANGE);
}
Hello would it be possible to add a function for bulk setting of INPUT/OUTPUT of the GPIO? im currently using 5 of these and 80 lines of code is used up for just setting the direction of the GPIO, i mean its not really a bad thing, just to make the code cleaner to look at. Alternatively having a function to read/write register directly would also be good as i can do the bulk setting of gpio direction there.
Thanks ! :)
The text was updated successfully, but these errors were encountered: