beagleboard / am335x_pru_package

331 stars 181 forks source link

prussdrv_pru_clear_event swap parameters #41

Open arielfernando opened 9 years ago

arielfernando commented 9 years ago

I had a problem using this function.

The function definition is: int prussdrv_pru_clear_event (unsigned int host_interrupt, unsigned int eventnum);

and the example is prussdrv_pru_clear_event ( PRU0_ARM_INTERRUPT, PRU_EVTOUT0 );

but this example doesn't work. To make it work I had to swap the parameters: prussdrv_pru_clear_event(PRU_EVTOUT_0, PRU0_ARM_INTERRUPT);

Thanks

jadonk commented 9 years ago

Thanks for the issue report. Any chance you could provide a bug fix via a pull request as well?

arielfernando commented 9 years ago

Jason, I was watching the code and i suggest to do a exhaustive review because these parameters are used in more that one place. I am starting to work with the beaglebone PRU and I don't want to do a simple swatch.

thanks for your answer Ariel

El jue., 6 ago. 2015 a las 12:46, Jason Kridner (notifications@github.com) escribió:

Thanks for the issue report. Any chance you could provide a bug fix via a pull request as well?

— Reply to this email directly or view it on GitHub https://github.com/beagleboard/am335x_pru_package/issues/41#issuecomment-128415435 .

engkan2kit commented 8 years ago

What happened to this? Is this the newer way prussdrv_pru_clear_event ( PRU0_ARM_INTERRUPT, PRU_EVTOUT0 );? Or is this just a clerical error in the documetation?

e-matteson commented 8 years ago

I'm curious as well. I haven't been able to clear PRU->host interrupts properly, using either argument order. If I attempt to clear them, the interrupt will only be received once, even if it is sent many times. If I don't clear them, the interrupt will be received many times, even if it is only sent once. Neither of these behaviors are useful.