include: drivers: nrf_clock_control: Fix <hal/nrf_clock.h> inclusion
This is a follow-up to commit 7a2ce2882a
.
Inclusion of <hal/nrf_clock.h> should not be done based on the NRF_CLOCK
symbol being defined, because it depends on the order in which headers
are included - that symbol gets defined when <nrfx.h> gets included and
this is not necessarily always happening earlier. Instead of adding
inclusion of <nrfx.h> here, move inclusion of <hal/nrf_clock.h> under
`#if defined(CONFIG_CLOCK_CONTROL_NRF)` where it is actually needed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
c458d92cf1
commit
60d3ac5e12
1 changed files with 2 additions and 3 deletions
|
@ -8,9 +8,6 @@
|
|||
#define ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_NRF_CLOCK_CONTROL_H_
|
||||
|
||||
#include <zephyr/device.h>
|
||||
#ifdef NRF_CLOCK
|
||||
#include <hal/nrf_clock.h>
|
||||
#endif
|
||||
#include <zephyr/sys/onoff.h>
|
||||
#include <zephyr/drivers/clock_control.h>
|
||||
|
||||
|
@ -20,6 +17,8 @@ extern "C" {
|
|||
|
||||
#if defined(CONFIG_CLOCK_CONTROL_NRF)
|
||||
|
||||
#include <hal/nrf_clock.h>
|
||||
|
||||
/** @brief Clocks handled by the CLOCK peripheral.
|
||||
*
|
||||
* Enum shall be used as a sys argument in clock_control API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue