Hello, I'm Vincenzo.
I'm quite experienced with C programming but I'm a newbie to ChibiOs and STM world, so I would like to say sorry in advance if I ask a n00b question. I was not able to find the answer to my question on the web nor on the docs.
I'm using the GPT driver to get a callback called at fixed intervals. I'd like to pass to this callback context information, you know, that void* pointer that you pass when register the callback function and is available between the parameters of the callback function every time it's called.
That's it, I was not able to find this mechanism in GPTDriver. Is this feature present but I cannot find it? Or is it absent? if so, is there a reason for the absence of that feature?
Thank you very much for your help,
regards,
Vincenzo
GPT callback context information Topic is solved
-
BingBang2222
- Posts: 2
- Joined: Fri May 27, 2016 9:48 pm
- Has thanked: 1 time
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: GPT callback context information
Hi,
You can extend the GPTDriver structure using GPT_DRIVER_EXT_FIELDS, add there your parameters.
Giovanni
You can extend the GPTDriver structure using GPT_DRIVER_EXT_FIELDS, add there your parameters.
Giovanni
-
BingBang2222
- Posts: 2
- Joined: Fri May 27, 2016 9:48 pm
- Has thanked: 1 time