I'm currently trying to develop an own driver. So far so good, I've got the whole pack , xml files structure, and managed to include those into the project. They will also be visible in the configuration and thread view in e2studio.
My question is: how can I write the driver code that a user defined interrupt in the configuration of the driver will be used?
Example of the timer driver configuration is what I mean:
The user is configuring the Callback function that should be used when the Interrupt is triggered. Also defines the priority of the Interrupt and the channel to be used.
I want to write a SMBus driver, were I can force a Interrupt if some timing issues are occurred or the incoming data have to be decoded.
My question is how to do this in the code?
I'm not sure if this can be done with this function: "NVIC_SetPendingIRQ(IRQn_Type IRQn)"
The connection between the callback function and the interrupt will be generated automatically? (Have to de defined in the xml file as property and in the head section).
Thank you for any help!
In reply to Richard:
I'm still analyzing the code from you, but so far I had create a simple graphic overview of how the .xml file is built:
If I'm right, then only the green part defines the interface from ISR and code... but I'm still learning it :)
I'm currently struggling with my SMbus driver. Could you please install this driver (it is under construction) and try to build a new project with it?
If I use an empty project and try to build with the SMBus driver added, then I get this message:
I have no idea where thouse names of interrupts are coming from... I have expected something like "smb_counter_overflow_isr" and so on.
I will be very gratefull for any hint.