From 03a1e9d2129b6b985078741e50885c8b21415107 Mon Sep 17 00:00:00 2001 From: Dirk Helbig Date: Tue, 18 Jun 2024 14:32:28 +0200 Subject: [PATCH] fix build for non nrf53 nordic boards, moved vendor command to 0x200 --- Kconfig | 4 +++- Kconfig.defaults | 7 ------- src/main.c | 6 +++++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Kconfig b/Kconfig index 1e3a9a6..43af214 100644 --- a/Kconfig +++ b/Kconfig @@ -5,8 +5,10 @@ rsource "Kconfig.defaults" config AUDIO_SYNC_TIMER_USES_RTC bool - default !BT_LL_ACS_NRF53 + default !BT_LL_ACS_NRF53 && SOC_SERIES_NRF53X select NRFX_RTC0 + select NRFX_DPPI + select NRFX_TIMER1 endmenu module = AUDIO_SYNC_TIMER diff --git a/Kconfig.defaults b/Kconfig.defaults index f90f240..e69de29 100644 --- a/Kconfig.defaults +++ b/Kconfig.defaults @@ -1,7 +0,0 @@ -# Audio sync timer -config NRFX_TIMER1 - default y - -# Audio sync timer -config NRFX_DPPI - default y diff --git a/src/main.c b/src/main.c index 8cc9ca5..360f67c 100644 --- a/src/main.c +++ b/src/main.c @@ -359,6 +359,7 @@ static int hci_uart_init(void) SYS_INIT(hci_uart_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); +#ifdef CONFIG_AUDIO_SYNC_TIMER_USES_RTC #define TIMESYNC_GPIO DT_NODELABEL(timesync) #if DT_NODE_HAS_STATUS(TIMESYNC_GPIO, okay) @@ -367,7 +368,7 @@ static const struct gpio_dt_spec timesync_pin = GPIO_DT_SPEC_GET(TIMESYNC_GPIO, #error "No timesync gpio available!" #endif -#define HCI_CMD_ISO_TIMESYNC (0x100) +#define HCI_CMD_ISO_TIMESYNC (0x200) struct hci_cmd_iso_timestamp_response { struct bt_hci_evt_cc_status cc; @@ -399,6 +400,7 @@ uint8_t hci_cmd_iso_timesync_cb(struct net_buf *buf) return BT_HCI_ERR_EXT_HANDLED; } +#endif int main(void) { @@ -438,6 +440,7 @@ int main(void) } } +#ifdef CONFIG_AUDIO_SYNC_TIMER_USES_RTC /* Register iso_timesync command */ static struct bt_hci_raw_cmd_ext cmd_list = { .op = BT_OP(BT_OGF_VS, HCI_CMD_ISO_TIMESYNC), @@ -450,6 +453,7 @@ int main(void) #endif bt_hci_raw_cmd_ext_register(&cmd_list, 1); +#endif /* Spawn the TX thread and start feeding commands and data to the * controller