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
In the main() function of click.c there's this endless loop:
while (1) {
};
This seems rather wasteful as one process is constantly running and draining your battery. I don't know much about the gpio library but apparent the handling of the I/O pins is done with signals or interrupts. So perhaps there is also a function in the library that lets you sleep without blocking the pin handling?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the main() function of click.c there's this endless loop:
while (1) {
};
This seems rather wasteful as one process is constantly running and draining your battery. I don't know much about the gpio library but apparent the handling of the I/O pins is done with signals or interrupts. So perhaps there is also a function in the library that lets you sleep without blocking the pin handling?
Beta Was this translation helpful? Give feedback.
All reactions