configs: All QE encoder files. Last change made timer hard-coded to 3. Make configurable.

This commit is contained in:
Gregory Nutt 2016-11-22 06:41:46 -06:00
parent dfa2d107b2
commit a0711b1c19
14 changed files with 40 additions and 7 deletions

View File

@ -76,6 +76,11 @@ config MIKROE_RAMMTD_SIZE
---help---
Sets the size of static RAM allocation for the SMART RAM device
config MIKROE_QETIMER
int "Timer to use with QE encoder"
default 3
depends on QENCODER
config PM_ALARM_SEC
int "PM_STANDBY delay (seconds)"
default 15

View File

@ -366,7 +366,7 @@ int board_app_initialize(uintptr_t arg)
#ifdef CONFIG_QENCODER
/* Initialize and register the qencoder driver */
ret = stm32_qencoder_initialize("/dev/qe0", 3);
ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_MIKROE_QETIMER);
if (ret != OK)
{
syslog(LOG_ERR,

View File

@ -5,6 +5,11 @@
if ARCH_BOARD_NUCLEO_F401RE
config NUCLEO_F401RE_QETIMER
int "Timer to use with QE encoder"
default 3
depends on QENCODER
config NUCLEO_F401RE_AJOY_MINBUTTONS
bool "Minimal Joystick Buttons"
default n if !STM32_USART1

View File

@ -142,7 +142,7 @@ int board_app_initialize(uintptr_t arg)
#ifdef CONFIG_QENCODER
/* Initialize and register the qencoder driver */
ret = stm32_qencoder_initialize("/dev/qe0", 3);
ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_NUCLEO_F401RE_QETIMER);
if (ret != OK)
{
syslog(LOG_ERR,

View File

@ -5,6 +5,11 @@
if ARCH_BOARD_NUCLEO_L476RG
config NUCLEO_L476RG_QETIMER
int "Timer to use with QE encoder"
default 3
depends on QENCODER
config NUCLEO_L476RG_AJOY_MINBUTTONS
bool "Minimal Joystick Buttons"
default n if !STM32_USART1

View File

@ -221,7 +221,7 @@ int board_app_initialize(uintptr_t arg)
#ifdef CONFIG_QENCODER
/* Initialize and register the qencoder driver */
ret = stm32l4_qencoder_initialize("/dev/qe0", 3);
ret = stm32l4_qencoder_initialize("/dev/qe0", CONFIG_NUCLEO_L476RG_QETIMER);
if (ret != OK)
{
syslog(LOG_ERR,

View File

@ -5,6 +5,11 @@
if ARCH_BOARD_STM32F3_DISCOVERY
config STM32F3DISCO_QETIMER
int "Timer to use with QE encoder"
default 3
depends on QENCODER
config PM_BUTTONS
bool "PM Button support"
default n

View File

@ -130,7 +130,7 @@ int board_app_initialize(uintptr_t arg)
#ifdef CONFIG_QENCODER
/* Initialize and register the qencoder driver */
ret = stm32_qencoder_initialize("/dev/qe0", 3);
ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32F3DISCO_QETIMER);
if (ret != OK)
{
syslog(LOG_ERR,

View File

@ -22,6 +22,11 @@ config STM32F4DISCO_USBHOST_PRIO
default 100
depends on USBHOST
config STM32F4DISCO_QETIMER
int "Timer to use with QE encoder"
default 3
depends on QENCODER
config PM_BUTTONS
bool "PM button support"
default n

View File

@ -456,6 +456,8 @@ pins PA15 and PA1 for CH1 and CH2, respectively). If TIM8 is selected, then
PC6 and PI5 will be used for CH1 and CH2 (see include board.h for pin
definitions).
Selected via CONFIG_STM32F4DISCO_QETIMER
FPU
===

View File

@ -162,7 +162,7 @@ int stm32_bringup(void)
#ifdef CONFIG_QENCODER
/* Initialize and register the qencoder driver */
ret = stm32_qencoder_initialize("/dev/qe0", 3);
ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32F4DISCO_QETIMER);
if (ret != OK)
{
syslog(LOG_ERR,

View File

@ -1,7 +1,7 @@
/************************************************************************************
* configs/stm32f4discovery/src/stm32_qencoder.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -4,4 +4,10 @@
#
if ARCH_BOARD_STM32FL_DISCOVERY
config STM32LDISCO_QETIMER
int "Timer to use with QE encoder"
default 3
depends on QENCODER
endif

View File

@ -94,7 +94,7 @@ int board_app_initialize(uintptr_t arg)
#ifdef CONFIG_QENCODER
/* Initialize and register the qencoder driver */
ret = stm32_qencoder_initialize("/dev/qe0", 3);
ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32LDISCO_QETIMER);
if (ret != OK)
{
syslog(LOG_ERR,