Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Commit f86079a

Browse files
nordic-krchaescolar
authored andcommitted
nrfx: hal: Add missing functions
Add nrf_clock_task_address_get(), nrf_clock_event_address_get(), and nrf_power_int_enable_get(), to make it possible to compile the nrfx_clock and nrfx_power drivers. Signed-off-by: Krzysztof Chruscinski <[email protected]> Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 0025012 commit f86079a

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/nrfx/hal/nrf_clock.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,18 @@ void nrf_clock_cal_timer_timeout_set(NRF_CLOCK_Type * p_reg, uint32_t interval);
372372

373373
/* Bodies for inlined functions */
374374

375+
NRF_STATIC_INLINE uint32_t nrf_clock_task_address_get(NRF_CLOCK_Type const * p_reg,
376+
nrf_clock_task_t task)
377+
{
378+
return (uint32_t)((uint8_t *)p_reg + (uint32_t)task);
379+
}
380+
381+
NRF_STATIC_INLINE uint32_t nrf_clock_event_address_get(NRF_CLOCK_Type const * p_reg,
382+
nrf_clock_event_t event)
383+
{
384+
return (uint32_t)((uint8_t *)p_reg + (uint32_t)event);
385+
}
386+
375387
NRF_STATIC_INLINE void nrf_clock_event_clear(NRF_CLOCK_Type * p_reg, nrf_clock_event_t event)
376388
{
377389
*((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL;

src/nrfx/hal/nrf_power.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*
66
*/
7+
#ifndef BS_NRF_POWER_H__
8+
#define BS_NRF_POWER_H__
9+
710
#include "../drivers/nrfx_common.h"
11+
12+
NRF_STATIC_INLINE uint32_t nrf_power_int_enable_get(NRF_POWER_Type const * p_reg)
13+
{
14+
return p_reg->INTENSET;
15+
}
16+
17+
#endif /* BS_NRF_POWER_H__ */

0 commit comments

Comments
 (0)