mirror of
https://github.com/apache/nuttx.git
synced 2026-10-08 14:55:18 +00:00
stm32f4discovery: Add support to APDS9960
This commit is contained in:
parent
bee9dcc73a
commit
9a08b04d3f
2 changed files with 22 additions and 0 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@
|
|||
# include <nuttx/usb/rndis.h>
|
||||
#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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue