diff --git a/boards/arm/stm32/stm32f4discovery/include/board.h b/boards/arm/stm32/stm32f4discovery/include/board.h index 6f2698a1f24..c9af4896a05 100644 --- a/boards/arm/stm32/stm32f4discovery/include/board.h +++ b/boards/arm/stm32/stm32f4discovery/include/board.h @@ -439,6 +439,13 @@ #define BOARD_ZEROCROSS_GPIO \ (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTD|GPIO_PIN0) +/* Pin for APDS-9960 sensor */ + +#define GPIO_APDS9960_INT \ + (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTE|GPIO_PIN0) + +#define BOARD_APDS9960_GPIO_INT GPIO_APDS9960_INT + /* LIS3DSH */ #define GPIO_LIS3DSH_EXT0 \ diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c index 9a4340b421a..99678d5c23d 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c @@ -54,6 +54,10 @@ # include #endif +#ifdef CONFIG_SENSORS_APDS9960 +#include "stm32_apds9960.h" +#endif + #include "stm32f4discovery.h" /* Conditional logic in stm32f4discovery.h will determine if certain features @@ -420,6 +424,17 @@ int stm32_bringup(void) } #endif +#ifdef CONFIG_SENSORS_APDS9960 + /* Register the APDS-9960 gesture sensor */ + + ret = board_apds9960_initialize(0, 1); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: board_apds9960_initialize() failed: %d\n", + ret); + } +#endif + #ifdef CONFIG_RTC_DS1307 ret = stm32_ds1307_init(); if (ret < 0)