![]() |
nRF5 SDK
v16.0.0
|
| Choose documentation: | nRF5 SDK | S112 SoftDevice API | S113 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
Module to declare HAL Atomic API. More...
Typedefs | |
| typedef volatile uint32_t | atomic_t |
Functions | |
| void | hal_atomic_start (atomic_t *p_atomic) |
| Enters atomic section. More... | |
| void | hal_atomic_end (atomic_t *p_atomic) |
| Exits atomic section. More... | |
Module to declare HAL Atomic API.
The Atomic module implements atomic section interface. This is made by disabling the global interrupts, which is a hardware dependent feature. The user may call hal_atomic_start() to open an atomic section (disable interrupts) and hal_atomic_end() to exit from the section (restore interrupts). The algorithm supports nesting sections.
| void hal_atomic_end | ( | atomic_t * | p_atomic | ) |
Exits atomic section.
Restores status register
| [in] | p_atomic | pointer to buffer to restore current value of the status register from. |
| void hal_atomic_start | ( | atomic_t * | p_atomic | ) |
Enters atomic section.
Disables global interrupts.
| [in] | p_atomic | pointer to buffer to store current value of the status register. |