You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2019/06/13 15:23:30 UTC
[mynewt-core] branch master updated: drivers/*da1469x;
don't depend on MCU specific header file directly. This allows use
of the driver on different MCU with same type of peripheral. Direct them to
find the proper definition via mcu/mcu.h.
This is an automated email from the ASF dual-hosted git repository.
marko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new bb3b766 drivers/*da1469x; don't depend on MCU specific header file directly. This allows use of the driver on different MCU with same type of peripheral. Direct them to find the proper definition via mcu/mcu.h.
new 39cf1f4 Merge pull request #1875 from mkiiskila/69x_mcu_independent_drivers
bb3b766 is described below
commit bb3b7669cd9df4b1afe14ed32f162641b7c76341
Author: Marko Kiiskila <ma...@apache.org>
AuthorDate: Thu Jun 13 15:35:55 2019 +0300
drivers/*da1469x; don't depend on MCU specific header file directly.
This allows use of the driver on different MCU with same type of
peripheral. Direct them to find the proper definition via mcu/mcu.h.
---
hw/drivers/adc/gpadc_da1469x/pkg.yml | 1 -
hw/drivers/adc/gpadc_da1469x/src/gpadc_da1469x.c | 1 -
hw/drivers/adc/sdadc_da1469x/pkg.yml | 1 -
hw/drivers/adc/sdadc_da1469x/src/sdadc_da1469x.c | 1 -
hw/drivers/trng/trng_da1469x/src/trng_da1469x.c | 2 +-
hw/mcu/dialog/da1469x/include/mcu/mcu.h | 2 ++
6 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/drivers/adc/gpadc_da1469x/pkg.yml b/hw/drivers/adc/gpadc_da1469x/pkg.yml
index fa0b91a..685cf84 100644
--- a/hw/drivers/adc/gpadc_da1469x/pkg.yml
+++ b/hw/drivers/adc/gpadc_da1469x/pkg.yml
@@ -31,4 +31,3 @@ pkg.apis:
pkg.deps:
- "@apache-mynewt-core/hw/drivers/adc"
- - hw/mcu/dialog/da1469x
diff --git a/hw/drivers/adc/gpadc_da1469x/src/gpadc_da1469x.c b/hw/drivers/adc/gpadc_da1469x/src/gpadc_da1469x.c
index 0a7faea..bd26497 100644
--- a/hw/drivers/adc/gpadc_da1469x/src/gpadc_da1469x.c
+++ b/hw/drivers/adc/gpadc_da1469x/src/gpadc_da1469x.c
@@ -23,7 +23,6 @@
#include <adc/adc.h>
-#include <DA1469xAB.h>
#include <mcu/mcu.h>
#include <mcu/da1469x_pd.h>
diff --git a/hw/drivers/adc/sdadc_da1469x/pkg.yml b/hw/drivers/adc/sdadc_da1469x/pkg.yml
index 25b94d5..d3fc1e3 100644
--- a/hw/drivers/adc/sdadc_da1469x/pkg.yml
+++ b/hw/drivers/adc/sdadc_da1469x/pkg.yml
@@ -31,4 +31,3 @@ pkg.apis:
pkg.deps:
- "@apache-mynewt-core/hw/drivers/adc"
- - hw/mcu/dialog/da1469x
diff --git a/hw/drivers/adc/sdadc_da1469x/src/sdadc_da1469x.c b/hw/drivers/adc/sdadc_da1469x/src/sdadc_da1469x.c
index baef543..1752b1e 100644
--- a/hw/drivers/adc/sdadc_da1469x/src/sdadc_da1469x.c
+++ b/hw/drivers/adc/sdadc_da1469x/src/sdadc_da1469x.c
@@ -21,7 +21,6 @@
#include <adc/adc.h>
-#include <DA1469xAB.h>
#include <mcu/mcu.h>
#include <mcu/da1469x_pd.h>
diff --git a/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c b/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
index db8cb9d..de970b9 100644
--- a/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
+++ b/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
@@ -19,7 +19,7 @@
#include <stdint.h>
#include <trng/trng.h>
-#include <DA1469xAB.h>
+#include <mcu/mcu.h>
#define DA1469X_TRNG_FIFO_SIZE (32 * sizeof(uint32_t))
#define DA1469X_TRNG_FIFO_ADDR (0x30050000UL)
diff --git a/hw/mcu/dialog/da1469x/include/mcu/mcu.h b/hw/mcu/dialog/da1469x/include/mcu/mcu.h
index 4e9b769..01155e8 100644
--- a/hw/mcu/dialog/da1469x/include/mcu/mcu.h
+++ b/hw/mcu/dialog/da1469x/include/mcu/mcu.h
@@ -24,6 +24,8 @@
extern "C" {
#endif
+#include "DA1469xAB.h"
+
#define sec_text_ram_core __attribute__((section(".text_ram"))) __attribute__((noinline))
#define MCU_SYSVIEW_INTERRUPTS \