e-Paper icon indicating copy to clipboard operation
e-Paper copied to clipboard

Efficiently wait for pin change

Open rohoog opened this issue 4 years ago • 0 comments

Use the kernel notification (poll) of Pin level change.

For libbcm2835 and wiringpi, a wait loop with delay is used instead. Replace the usleep loop with a nanosleep.

some displays had a full-busy-wait loop resulting in 100% cpu usage during waiting for the busy pin. These will see a huge reduction in sys and user cputime consumption.

Note that some displays require (apparently) sending of a SPI command in the waiting loop for the busy pin. These are not changed.

rohoog avatar Oct 31 '20 23:10 rohoog