From c28b9386008bb8a3cce1f7feb31aa311986e6ed0 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Mon, 23 Oct 2017 06:59:15 -0600 Subject: [PATCH] stm32f103-minimum: Fix a compilation warning. stm32f103-minimum: Add an ADPS-9960 example configuration --- configs/stm32f103-minimum/apds9960/defconfig | 63 +++++++++++++++++++ .../stm32f103-minimum/src/stm32f103_minimum.h | 12 ++++ 2 files changed, 75 insertions(+) create mode 100644 configs/stm32f103-minimum/apds9960/defconfig diff --git a/configs/stm32f103-minimum/apds9960/defconfig b/configs/stm32f103-minimum/apds9960/defconfig new file mode 100644 index 0000000000..bca7216518 --- /dev/null +++ b/configs/stm32f103-minimum/apds9960/defconfig @@ -0,0 +1,63 @@ +# CONFIG_DISABLE_OS_API is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +# CONFIG_NSH_DISABLESCRIPT is not set +CONFIG_ARCH_BOARD_STM32F103_MINIMUM=y +CONFIG_ARCH_BOARD="stm32f103-minimum" +CONFIG_ARCH_CHIP_STM32=y +CONFIG_ARCH_CHIP_STM32F103C8=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARCH="arm" +CONFIG_BOARD_LOOPSPERMSEC=5483 +CONFIG_BUILTIN=y +CONFIG_DEFAULT_SMALL=y +CONFIG_EXAMPLES_APDS9960=y +CONFIG_EXAMPLES_NSH=y +CONFIG_I2C_DRIVER=y +CONFIG_IDLETHREAD_STACKSIZE=512 +CONFIG_MAX_TASKS=16 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=1024 +CONFIG_NSH_LINELEN=80 +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_PREALLOC_TIMERS=4 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_PTHREAD_STACK_DEFAULT=1024 +CONFIG_PTHREAD_STACK_MIN=512 +CONFIG_RAM_SIZE=20480 +CONFIG_RAM_START=0x20000000 +CONFIG_RAW_BINARY=y +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKSTACKSIZE=3072 +CONFIG_SCHED_WAITPID=y +CONFIG_SDCLONE_DISABLE=y +CONFIG_SENSORS_APDS9960=y +CONFIG_SENSORS=y +CONFIG_SERIAL_TERMIOS=y +CONFIG_START_DAY=5 +CONFIG_START_MONTH=7 +CONFIG_START_YEAR=2011 +CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y +CONFIG_STM32_I2C1=y +CONFIG_STM32_JTAG_FULL_ENABLE=y +CONFIG_STM32_USART1=y +CONFIG_SYMTAB_ORDEREDBYNAME=y +CONFIG_TASK_NAME_SIZE=0 +CONFIG_USART1_SERIAL_CONSOLE=y +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_USERMAIN_STACKSIZE=1024 +CONFIG_WDOG_INTRESERVE=0 diff --git a/configs/stm32f103-minimum/src/stm32f103_minimum.h b/configs/stm32f103-minimum/src/stm32f103_minimum.h index e6f3698ad3..3e63608bea 100644 --- a/configs/stm32f103-minimum/src/stm32f103_minimum.h +++ b/configs/stm32f103-minimum/src/stm32f103_minimum.h @@ -207,6 +207,18 @@ int stm32_gpio_initialize(void); int stm32_adc_setup(void); #endif +/************************************************************************************ + * Name: stm32_apds9960initialize + * + * Description: + * Initialize APDS-9960 gesture sensor + * + ************************************************************************************/ + +#ifdef CONFIG_SENSORS_APDS9960 +int stm32_apds9960initialize(FAR const char *devpath) +#endif + /************************************************************************************ * Name: stm32_spidev_initialize *