Some day I needed a version of prussdrv_pru_wait_event() with a configurable timeout and thought I should share it with you. With the parameter "time_us" of prussdrv_pru_wait_event_timeout() one can configure the timeout in Microseconds.
A return value of -1 indicates an error while waiting for the PRU event. If a timeout occurs the function returns 0. Otherwise the return value behaves like in prussdrv_pru_wait_event()
Some day I needed a version of prussdrv_pru_wait_event() with a configurable timeout and thought I should share it with you. With the parameter "time_us" of prussdrv_pru_wait_event_timeout() one can configure the timeout in Microseconds.
A return value of -1 indicates an error while waiting for the PRU event. If a timeout occurs the function returns 0. Otherwise the return value behaves like in prussdrv_pru_wait_event()