Results 1 to 2 of 2
Thread: Link two driver
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2013
Link two driver
i'm newer in this forum, i've got a question about driver.
I'm developping two driver, two because i've got one big driver, and for my need, this driver have to be cut in two part.
First part is the generic driver with an interrupt function. This interrupt thread need to call the second driver. In the second driver we've got the function to call.
So Driver A interrupt, when interrupt arrive, Driver B function need to be call by interrupt.
So i've got my two driver, but i can't link them together.
I've tried pointer to call pointer when interrupt arrive, and before link my pointer with the function.
Do you have an idea to link them together without calling my function driver B in the driver A.
Sorry for my english
if you don't understand i can try to explain more about my problem.
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
You have a LOT of learning to do with regard to handling interrupts and what you should do inside an interrupt handler. This is not trivial stuff. You basically want your interrupt to do as little as possible, otherwise you will starve the system. Optimally, you would set a flag or semaphore and return, possibly writing some data to a memory buffer. The second part, or body, of the handler would be waiting on that flag/semaphore and when it detects the change, it will do whatever it needs to do.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!