Hi,
I am a bit confused when reading the documentation on the PalWritePad (and the other Pad operations).
http://chibios.sourceforge.net/html/gro ... 34c5b42daa
In the Note, it says that the function is not guaranteed to be atomic, and it can be enclosed between chSysLock() and chSysUnlock() to ensure this. However, the Function Class is "Normal" which means it cannot be invoked within a lock zone.
So, which one is it?
I really need to make a small set of Pad write operations atomic in a PWM callback, but I'm not sure if it is allowed.
Best regards,
Kjell
[DONE]Atomic IO operations
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Atomic IO operations
Is it safe to assume that if using lock is mentioned in the comments, it is allowed even if the Function class says it's not?
Thanks,
Kjell
Thanks,
Kjell
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times