| 239 | } |
| 240 | |
| 241 | static inline int LightEvent_TryReset(LightEvent* event) |
| 242 | { |
| 243 | __dmb(); |
| 244 | do |
| 245 | { |
| 246 | if (__ldrex(&event->state)) |
| 247 | { |
| 248 | __clrex(); |
| 249 | return 0; |
| 250 | } |
| 251 | } while (__strex(&event->state, CLEARED_ONESHOT)); |
| 252 | __dmb(); |
| 253 | return 1; |
| 254 | } |
| 255 | |
| 256 | void LightEvent_Init(LightEvent* event, ResetType reset_type) |
| 257 | { |
no test coverage detected