mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
nucleo-f103rb: add qenco example configuration
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
76904371a1
commit
8cb58213e5
@@ -5,4 +5,12 @@
|
|||||||
|
|
||||||
if ARCH_BOARD_NUCLEO_F103RB
|
if ARCH_BOARD_NUCLEO_F103RB
|
||||||
|
|
||||||
|
if SENSORS_QENCODER
|
||||||
|
|
||||||
|
config NUCLEO_F103RB_QETIMER
|
||||||
|
int "Timer to use with QE encoder"
|
||||||
|
default 2
|
||||||
|
|
||||||
|
endif # SENSORS_QENCODER
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#
|
||||||
|
# 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_ARCH="arm"
|
||||||
|
CONFIG_ARCH_BOARD="nucleo-f103rb"
|
||||||
|
CONFIG_ARCH_BOARD_NUCLEO_F103RB=y
|
||||||
|
CONFIG_ARCH_CHIP="stm32"
|
||||||
|
CONFIG_ARCH_CHIP_STM32=y
|
||||||
|
CONFIG_ARCH_CHIP_STM32F103RB=y
|
||||||
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
|
CONFIG_BOARD_LOOPSPERMSEC=5483
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_DEBUG_FULLOPT=y
|
||||||
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
CONFIG_DEFAULT_SMALL=y
|
||||||
|
CONFIG_EXAMPLES_QENCODER=y
|
||||||
|
CONFIG_EXAMPLES_QENCODER_HAVE_MAXPOS=y
|
||||||
|
CONFIG_EXAMPLES_QENCODER_MAXPOS=8192
|
||||||
|
CONFIG_INTELHEX_BINARY=y
|
||||||
|
CONFIG_NSH_ARCHINIT=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
|
CONFIG_NSH_FILEIOSIZE=1024
|
||||||
|
CONFIG_NSH_LINELEN=80
|
||||||
|
CONFIG_PREALLOC_TIMERS=4
|
||||||
|
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_WAITPID=y
|
||||||
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
|
CONFIG_SENSORS=y
|
||||||
|
CONFIG_SENSORS_QENCODER=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_JTAG_SW_ENABLE=y
|
||||||
|
CONFIG_STM32_QENCODER_DISABLE_EXTEND16BTIMERS=y
|
||||||
|
CONFIG_STM32_QENCODER_SAMPLE_FDTS_2=y
|
||||||
|
CONFIG_STM32_TIM2=y
|
||||||
|
CONFIG_STM32_TIM2_PARTIAL_REMAP_1=y
|
||||||
|
CONFIG_STM32_TIM2_QE=y
|
||||||
|
CONFIG_STM32_TIM2_QEPSC=0
|
||||||
|
CONFIG_STM32_USART2=y
|
||||||
|
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
|
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
@@ -37,6 +37,10 @@
|
|||||||
# include <nuttx/input/buttons.h>
|
# include <nuttx/input/buttons.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SENSORS_QENCODER
|
||||||
|
# include "board_qencoder.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nucleo-f103rb.h"
|
#include "nucleo-f103rb.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -122,6 +126,19 @@ int stm32_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SENSORS_QENCODER
|
||||||
|
/* Initialize and register the qencoder driver */
|
||||||
|
|
||||||
|
ret = board_qencoder_initialize(0, CONFIG_NUCLEO_F103RB_QETIMER);
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR,
|
||||||
|
"ERROR: Failed to register the qencoder: %d\n",
|
||||||
|
ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
UNUSED(ret);
|
UNUSED(ret);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user