drivers: i2s_nrfx: Add missing <hal/nrf_clock.h> inclusion
This driver uses the NRF_CLOCK_HAS_HFCLKAUDIO symbol that is defined in <hal/nrf_clock.h>, so it should explicitly include that header, not count on this inclusion being done by some other header, like <zephyr/drivers/clock_control/nrf_clock_control.h>. Extend also the build assertion that checks if the audio clock can be used so that now it ensures that the above symbol is defined (to prevent the driver from silently discarding the audio clock configured as the clock source). Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
60d3ac5e12
commit
3ebae000e5
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <zephyr/drivers/pinctrl.h>
|
||||
#include <soc.h>
|
||||
#include <nrfx_i2s.h>
|
||||
#include <hal/nrf_clock.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
#include <zephyr/irq.h>
|
||||
|
@ -971,7 +972,8 @@ static DEVICE_API(i2s, i2s_nrf_drv_api) = {
|
|||
init_clock_manager(dev); \
|
||||
return 0; \
|
||||
} \
|
||||
BUILD_ASSERT(I2S_CLK_SRC(idx) != ACLK || NRF_I2S_HAS_CLKCONFIG, \
|
||||
BUILD_ASSERT(I2S_CLK_SRC(idx) != ACLK || \
|
||||
(NRF_I2S_HAS_CLKCONFIG && NRF_CLOCK_HAS_HFCLKAUDIO), \
|
||||
"Clock source ACLK is not available."); \
|
||||
BUILD_ASSERT(I2S_CLK_SRC(idx) != ACLK || \
|
||||
DT_NODE_HAS_PROP(DT_NODELABEL(clock), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue