You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by vi...@apache.org on 2021/04/13 22:07:38 UTC

[mynewt-core] 02/02: nrf5340: Add BUS Driver dependencies

This is an automated email from the ASF dual-hosted git repository.

vipulrahane pushed a commit to branch nrf5340_misc_fixes
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 1991c891cd074fb06f2b77be9e81e45316c68427
Author: vrahane <vi...@proxy.com>
AuthorDate: Tue Apr 13 15:04:39 2021 -0700

    nrf5340: Add BUS Driver dependencies
---
 hw/mcu/nordic/nrf5340/pkg.yml              | 5 +++++
 hw/mcu/nordic/nrf5340/src/nrf5340_periph.c | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/hw/mcu/nordic/nrf5340/pkg.yml b/hw/mcu/nordic/nrf5340/pkg.yml
index deeb219..80860c6 100644
--- a/hw/mcu/nordic/nrf5340/pkg.yml
+++ b/hw/mcu/nordic/nrf5340/pkg.yml
@@ -30,6 +30,11 @@ pkg.deps:
     - "@apache-mynewt-core/hw/cmsis-core"
     - "@apache-mynewt-core/hw/hal"
 
+pkg.deps.BUS_DRIVER_PRESENT:
+    - "@apache-mynewt-core/hw/bus/drivers/spi_hal"
+    - "@apache-mynewt-core/hw/bus/drivers/i2c_common"
+    - "@apache-mynewt-core/hw/bus/drivers/i2c_nrf5340"
+
 pkg.cflags.NFC_PINS_AS_GPIO: 
     - '-DCONFIG_NFCT_PINS_AS_GPIOS=1'
 
diff --git a/hw/mcu/nordic/nrf5340/src/nrf5340_periph.c b/hw/mcu/nordic/nrf5340/src/nrf5340_periph.c
index ac85a78..d663bf0 100644
--- a/hw/mcu/nordic/nrf5340/src/nrf5340_periph.c
+++ b/hw/mcu/nordic/nrf5340/src/nrf5340_periph.c
@@ -25,6 +25,10 @@
 #include <nrfx.h>
 #include "hal/hal_spi.h"
 
+#if MYNEWT_VAL(BUS_DRIVER_PRESENT)
+#include "bus/bus.h"
+#endif
+
 #if MYNEWT_VAL(ADC_0)
 #include <adc/adc.h>
 #include <adc_nrf52/adc_nrf52.h>