You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2019/09/26 06:37:58 UTC
[mynewt-core] 02/05: sensors: Name collision fix
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 4642610fdf5f5f1fd53fa1caf13938ab71b936bd
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Wed Sep 25 12:07:48 2019 +0200
sensors: Name collision fix
Three sensors: lis2ds12, lis2dw12, lsm6dso defined non static symbol
dflt_notif_cfg.
This was not a problem as such but it prevented usage of those sensors
together due to linker error.
Now symbols are static and problem is gone.
---
hw/drivers/sensors/lis2ds12/src/lis2ds12.c | 2 +-
hw/drivers/sensors/lis2dw12/src/lis2dw12.c | 2 +-
hw/drivers/sensors/lsm6dso/src/lsm6dso.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/drivers/sensors/lis2ds12/src/lis2ds12.c b/hw/drivers/sensors/lis2ds12/src/lis2ds12.c
index 9c60a30..5284069 100644
--- a/hw/drivers/sensors/lis2ds12/src/lis2ds12.c
+++ b/hw/drivers/sensors/lis2ds12/src/lis2ds12.c
@@ -43,7 +43,7 @@
#define LIS2DS12_ST_NUM_READINGS 5
//SLEEP_CHG and SLEEP_STATE interrupts aren't available on int1 or int2 so dont need to be enabled
-const struct lis2ds12_notif_cfg dflt_notif_cfg[] = {
+static const struct lis2ds12_notif_cfg dflt_notif_cfg[] = {
{ SENSOR_EVENT_TYPE_SINGLE_TAP, 0, LIS2DS12_INT1_CFG_SINGLE_TAP },
{ SENSOR_EVENT_TYPE_DOUBLE_TAP, 0, LIS2DS12_INT1_CFG_DOUBLE_TAP },
{ SENSOR_EVENT_TYPE_FREE_FALL, 0, LIS2DS12_INT1_CFG_FF },
diff --git a/hw/drivers/sensors/lis2dw12/src/lis2dw12.c b/hw/drivers/sensors/lis2dw12/src/lis2dw12.c
index c0cc1af..c07eaab 100644
--- a/hw/drivers/sensors/lis2dw12/src/lis2dw12.c
+++ b/hw/drivers/sensors/lis2dw12/src/lis2dw12.c
@@ -46,7 +46,7 @@
#define LIS2DW12_ST_NUM_READINGS 5
-const struct lis2dw12_notif_cfg dflt_notif_cfg[] = {
+static const struct lis2dw12_notif_cfg dflt_notif_cfg[] = {
{
.event = SENSOR_EVENT_TYPE_SINGLE_TAP,
.int_num = 0,
diff --git a/hw/drivers/sensors/lsm6dso/src/lsm6dso.c b/hw/drivers/sensors/lsm6dso/src/lsm6dso.c
index 1c003fe..6132c20 100644
--- a/hw/drivers/sensors/lsm6dso/src/lsm6dso.c
+++ b/hw/drivers/sensors/lsm6dso/src/lsm6dso.c
@@ -56,7 +56,7 @@ static struct hal_spi_settings spi_lsm6dso_settings = {
#endif /* BUS_DRIVER_PRESENT */
/* Default event notification */
-const struct lsm6dso_notif_cfg dflt_notif_cfg[] = {
+static const struct lsm6dso_notif_cfg dflt_notif_cfg[] = {
{
.event = SENSOR_EVENT_TYPE_SINGLE_TAP,
.int_num = 0,