configs/stm32ldiscovery/: Add button suppot o stm32Ldiscovery. Add

chronometer board config.
This commit is contained in:
Alan Carvalho de Assis 2019-07-17 12:25:24 +02:00 committed by Gregory Nutt
parent db901120aa
commit 3ac3451404
5 changed files with 95 additions and 2 deletions

View File

@ -0,0 +1,79 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_NSH_DISABLEBG is not set
# CONFIG_NSH_DISABLE_EXEC is not set
# CONFIG_NSH_DISABLE_EXIT is not set
# CONFIG_NSH_DISABLE_HEXDUMP is not set
# CONFIG_NSH_DISABLE_PS is not set
# CONFIG_NSH_DISABLE_XD is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="stm32ldiscovery"
CONFIG_ARCH_BOARD_STM32L_DISCOVERY=y
CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32L152RB=y
CONFIG_ARCH_IRQBUTTONS=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARM_LWL_CONSOLE=y
CONFIG_BOARD_LOOPSPERMSEC=2796
CONFIG_BUILTIN=y
CONFIG_BUTTONS=y
CONFIG_BUTTONS_LOWER=y
CONFIG_CLOCK_MONOTONIC=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_MQUEUE=y
CONFIG_EXAMPLES_CHRONO=y
CONFIG_EXAMPLES_SLCD=y
CONFIG_INPUT=y
CONFIG_INTELHEX_BINARY=y
CONFIG_LCD=y
CONFIG_LIB_SLCDCODEC=y
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_MM_SMALL=y
CONFIG_NFILE_DESCRIPTORS=6
CONFIG_NFILE_STREAMS=6
CONFIG_NPTHREAD_KEYS=0
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_DISABLE_CD=y
CONFIG_NSH_DISABLE_CP=y
CONFIG_NSH_DISABLE_DATE=y
CONFIG_NSH_DISABLE_MKDIR=y
CONFIG_NSH_DISABLE_MOUNT=y
CONFIG_NSH_DISABLE_RM=y
CONFIG_NSH_DISABLE_RMDIR=y
CONFIG_NSH_DISABLE_UMOUNT=y
CONFIG_NSH_FILEIOSIZE=64
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0
CONFIG_PREALLOC_WDOGS=4
CONFIG_PTHREAD_STACK_DEFAULT=1536
CONFIG_RAM_SIZE=16384
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_RTC_DATETIME=y
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_STANDARD_SERIAL=y
CONFIG_START_DAY=19
CONFIG_START_MONTH=5
CONFIG_START_YEAR=2013
CONFIG_STDIO_DISABLE_BUFFERING=y
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_LCD=y
CONFIG_STM32_PWR=y
CONFIG_STM32_RTC=y
CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
CONFIG_USERMAIN_STACKSIZE=1536
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_WDOG_INTRESERVE=0

View File

@ -46,8 +46,7 @@
# include <stdint.h>
#endif
#include "stm32_rcc.h"
#include "stm32.h"
#include <sys/types.h>
/************************************************************************************
* Pre-processor Definitions

View File

@ -42,6 +42,8 @@
#include <syslog.h>
#include <nuttx/board.h>
#include <nuttx/input/buttons.h>
#include <arch/board/board.h>
#include "stm32ldiscovery.h"
@ -68,6 +70,16 @@ int stm32_bringup(void)
{
int ret = OK;
#ifdef CONFIG_BUTTONS
/* Register the BUTTON driver */
ret = btn_lower_initialize("/dev/buttons");
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret);
}
#endif
#ifdef CONFIG_STM32_LCD
/* Initialize the SLCD and register the SLCD device as /dev/slcd0 */

View File

@ -46,6 +46,7 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "stm32_gpio.h"
#include "stm32ldiscovery.h"
#ifdef CONFIG_ARCH_BUTTONS

View File

@ -45,6 +45,8 @@
#include <nuttx/compiler.h>
#include <stdint.h>
#include <arch/chip/chip.h>
/****************************************************************************************************
* Pre-processor Definitions
****************************************************************************************************/