configs/stm3210e-eval/pm: Configuration converted to use the kconfig-frontends tools

This commit is contained in:
Gregory Nutt 2014-03-04 09:55:52 -06:00
parent 18f74bade9
commit 31cc75b181
10 changed files with 1117 additions and 881 deletions

View File

@ -6797,3 +6797,5 @@
* configs/*/dhcpd: Add missing DHCPD configuratino settings (2014-3-3).
* configs/stm32f4discovery/pm: Configuration converted to use the
kconfig-frontends tools (2014-3-4)
* configs/stm3210e-eval/pm: Configuration converted to use the
kconfig-frontends tools (2014-3-4)

View File

@ -805,7 +805,6 @@ M3 Wildfire-specific Configuration Options
CONFIG_STM32_AM240320_DISABLE
CONFIG_STM32_SPFD5408B_DISABLE
CONFIG_STM32_R61580_DISABLE
Configurations
==============

View File

@ -9,30 +9,31 @@ comment "STM3210E-EVAL LCD Hardware Configuration"
config STM3210E_LCD
bool "Select support for the STM3210E-EVAL LCD"
default y
depends on LCD && STM32_FSMC
depends on STM32_FSMC
select LCD
---help---
Enable support for the LCD on the STM3210E-EVAL board. See additional,
LCD-common settings in the drivers/lcd Kconfig file.
config LCD_BACKLIGHT
config STM3210E_LCD_BACKLIGHT
bool "LCD backlight support"
depends on STM3210E_LCD
default n
---help---
Define to support a backlight.
config LCD_PWM
config STM3210E_LCD_PWM
bool "LCD backlight PWM control"
default n
depends on LCD_BACKLIGHT && STM32_TIM1
depends on STM3210E_LCD_BACKLIGHT && STM32_TIM1
---help---
If STM32_TIM1 is also defined, then an adjustable backlight will be
provided using timer 1 to generate various pulse widthes. The
granularity of the settings is determined by LCD_MAXPOWER. If LCD_PWM
granularity of the settings is determined by LCD_MAXPOWER. If STM3210E_LCD_PWM
(or STM32_TIM1) is not defined, then a simple on/off backlight is
provided.
config LCD_RDSHIFT
config STM3210E_LCD_RDSHIFT
int "LCD data shift"
default 5
depends on STM3210E_LCD
@ -40,7 +41,7 @@ config LCD_RDSHIFT
When reading 16-bit gram data, there appears to be a shift in the returned
data. This value fixes the offset. Default 5.
config STM32_AM240320_DISABLE
config STM3210E_AM240320_DISABLE
bool "Disable AM240320 support"
default n
depends on STM3210E_LCD
@ -49,7 +50,7 @@ config STM32_AM240320_DISABLE
ID value. However, code size can be reduced by suppressing support for
individual LCDs using this option
config STM32_SPFD5408B_DISABLE
config STM3210E_SPFD5408B_DISABLE
bool "Disable SPFD5408B support"
default n
depends on STM3210E_LCD
@ -58,7 +59,7 @@ config STM32_SPFD5408B_DISABLE
ID value. However, code size can be reduced by suppressing support for
individual LCDs using this option
config STM32_R61580_DISABLE
config STM3210E_R61580_DISABLE
bool "Disable R61580 support"
default n
depends on STM3210E_LCD

View File

@ -658,14 +658,14 @@ STM3210E-EVAL-specific Configuration Options
portrait" orientation support. In this orientation, the
STM3210E-EVAL's LCD ribbon cable is at the top of the display.
Default is 320x240 "landscape" orientation.
CONFIG_LCD_BACKLIGHT - Define to support a backlight.
CONFIG_LCD_PWM - If CONFIG_STM32_TIM1 is also defined, then an
CONFIG_STM3210E_LCD_BACKLIGHT - Define to support a backlight.
CONFIG_STM3210E_LCD_PWM - If CONFIG_STM32_TIM1 is also defined, then an
adjustable backlight will be provided using timer 1 to generate
various pulse widthes. The granularity of the settings is
determined by CONFIG_LCD_MAXPOWER. If CONFIG_LCD_PWM (or
determined by CONFIG_LCD_MAXPOWER. If CONFIG_STM3210E_LCD_PWM (or
CONFIG_STM32_TIM1) is not defined, then a simple on/off backlight
is provided.
CONFIG_LCD_RDSHIFT - When reading 16-bit gram data, there appears
CONFIG_STM3210E_LCD_RDSHIFT - When reading 16-bit gram data, there appears
to be a shift in the returned data. This value fixes the offset.
Default 5.
@ -673,9 +673,9 @@ STM3210E-EVAL-specific Configuration Options
ID value. However, code size can be reduced by suppressing support for
individual LCDs using:
CONFIG_STM32_AM240320_DISABLE
CONFIG_STM32_SPFD5408B_DISABLE
CONFIG_STM32_R61580_DISABLE
CONFIG_STM3210E_AM240320_DISABLE
CONFIG_STM3210E_SPFD5408B_DISABLE
CONFIG_STM3210E_R61580_DISABLE
Configurations
==============
@ -941,43 +941,60 @@ Where <subdir> is one of the following:
configuration should provide some guideline for power management in your
STM32 application.
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows
NOTES:
CONFIG_ARCH_CUSTOM_PMINIT and CONFIG_ARCH_IDLE_CUSTOM are necessary parts of the
PM configuration:
1. This configuration uses the mconf-based configuration tool. To
change this configurations using that tool, you should:
CONFIG_ARCH_CUSTOM_PMINIT=y
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
and misc/tools/
CONFIG_ARCH_CUSTOM_PMINIT moves the PM initialization from arch/arm/src/stm32/stm32_pminitialiaze.c
to configs/stm3210-eval/src/up_pm.c. This allows us to support board-
specific PM initialization.
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
CONFIG_ARCH_IDLE_CUSTOM=y
2. Default configuration is Cygwin under windows using the CodeSourcery
toolchain:
The bulk of the PM activities occur in the IDLE loop. The IDLE loop is
special because it is what runs when there is no other task running. Therefore
when the IDLE executes, we can be assure that nothing else is going on; this
is the ideal condition for doing reduced power management.
CONFIG_HOST_WINDOWS=y : Windows
CONFIG_WINDOWS_CYGWIN=y : Cygwin
CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows
The configuration CONFIG_ARCH_IDLE_CUSTOM allows us to "steal" the normal STM32
IDLE loop (of arch/arm/src/stm32/stm32_idle.c) and replace this with our own
custom IDLE loop (at configs/stm3210-eval/src/up_idle.c).
3. CONFIG_ARCH_CUSTOM_PMINIT and CONFIG_ARCH_IDLE_CUSTOM are necessary
parts of the PM configuration:
Here are some additional things to note in the configuration:
CONFIG_ARCH_CUSTOM_PMINIT=y
CONFIG_PM_BUTTONS=y
CONFIG_ARCH_CUSTOM_PMINIT moves the PM initialization from
arch/arm/src/stm32/stm32_pminitialiaze.c to configs/stm3210-eval/src/stm32_pm.c.
This allows us to support board-specific PM initialization.
CONFIG_PM_BUTTONS enables button support for PM testing. Buttons can drive
EXTI interrupts and EXTI interrrupts can be used to wakeup for certain reduced
power modes (STOP mode). The use of the buttons here is for PM testing purposes
only; buttons would normally be part the application code and CONFIG_PM_BUTTONS
would not be defined.
CONFIG_ARCH_IDLE_CUSTOM=y
CONFIG_RTC_ALARM=y
The bulk of the PM activities occur in the IDLE loop. The IDLE loop
is special because it is what runs when there is no other task running.
Therefore when the IDLE executes, we can be assure that nothing else
is going on; this is the ideal condition for doing reduced power
management.
The RTC alarm is used to wake up from STOP mode and to transition to
STANDBY mode. This used of the RTC alarm could conflict with other uses of
the RTC alarm in your application.
The configuration CONFIG_ARCH_IDLE_CUSTOM allows us to "steal" the
normal STM32 IDLE loop (of arch/arm/src/stm32/stm32_idle.c) and replace
this with our own custom IDLE loop (at configs/stm3210-eval/src/up_idle.c).
4. Here are some additional things to note in the configuration:
CONFIG_PM_BUTTONS=y
CONFIG_PM_BUTTONS enables button support for PM testing. Buttons can
drive EXTI interrupts and EXTI interrrupts can be used to wakeup for
certain reduced power modes (STOP mode). The use of the buttons here
is for PM testing purposes only; buttons would normally be part the
application code and CONFIG_PM_BUTTONS would not be defined.
CONFIG_RTC_ALARM=y
The RTC alarm is used to wake up from STOP mode and to transition to
STANDBY mode. This used of the RTC alarm could conflict with other
uses of the RTC alarm in your application.
usbserial:
---------

View File

@ -379,11 +379,11 @@ CONFIG_NSH_MMCSDSLOTNO=0
# STM3210E-EVAL LCD Hardware Configuration
#
CONFIG_STM3210E_LCD=y
# CONFIG_LCD_BACKLIGHT is not set
CONFIG_LCD_RDSHIFT=5
# CONFIG_STM32_AM240320_DISABLE is not set
# CONFIG_STM32_SPFD5408B_DISABLE is not set
CONFIG_STM32_R61580_DISABLE=y
# CONFIG_STM3210E_LCD_BACKLIGHT is not set
CONFIG_STM3210E_LCD_RDSHIFT=5
# CONFIG_STM3210E_AM240320_DISABLE is not set
# CONFIG_STM3210E_SPFD5408B_DISABLE is not set
CONFIG_STM3210E_R61580_DISABLE=y
#
# RTOS Features
@ -678,7 +678,7 @@ CONFIG_FAT_MAXFNAME=32
CONFIG_NX=y
CONFIG_NX_LCDDRIVER=y
CONFIG_NX_NPLANES=1
CONFIG_NX_WRITEONLY=y
# CONFIG_NX_WRITEONLY is not set
#
# Supported Pixel Depths

View File

@ -369,11 +369,11 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y
# STM3210E-EVAL LCD Hardware Configuration
#
CONFIG_STM3210E_LCD=y
# CONFIG_LCD_BACKLIGHT is not set
CONFIG_LCD_RDSHIFT=5
# CONFIG_STM32_AM240320_DISABLE is not set
# CONFIG_STM32_SPFD5408B_DISABLE is not set
CONFIG_STM32_R61580_DISABLE=y
# CONFIG_STM3210E_LCD_BACKLIGHT is not set
CONFIG_STM3210E_LCD_RDSHIFT=5
# CONFIG_STM3210E_AM240320_DISABLE is not set
# CONFIG_STM3210E_SPFD5408B_DISABLE is not set
CONFIG_STM3210E_R61580_DISABLE=y
#
# RTOS Features
@ -604,7 +604,7 @@ CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_NX=y
CONFIG_NX_LCDDRIVER=y
CONFIG_NX_NPLANES=1
CONFIG_NX_WRITEONLY=y
# CONFIG_NX_WRITEONLY is not set
#
# Supported Pixel Depths

View File

@ -162,9 +162,9 @@ CONFIG_UART5_2STOP=0
#
# STM3210E-EVAL specific LCD settings
#
CONFIG_STM32_AM240320_DISABLE=n
CONFIG_STM32_SPFD5408B_DISABLE=n
CONFIG_STM32_R61580_DISABLE=y
CONFIG_STM3210E_AM240320_DISABLE=n
CONFIG_STM3210E_SPFD5408B_DISABLE=n
CONFIG_STM3210E_R61580_DISABLE=y
#
# General build options
@ -465,8 +465,8 @@ CONFIG_LCD_NOGETRUN=y
CONFIG_LCD_LANDSCAPE=y
CONFIG_LCD_PORTRAIT=n
CONFIG_LCD_RPORTRAIT=n
CONFIG_LCD_BACKLIGHT=n
CONFIG_LCD_PWM=n
CONFIG_STM3210E_LCD_BACKLIGHT=n
CONFIG_STM3210E_LCD_PWM=n
#
# Settings for examples/uip

View File

@ -1,63 +0,0 @@
############################################################################
# configs/stm3210e-eval/pm/appconfig
#
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
# Path to example in apps/examples containing the user_start entry point
CONFIGURED_APPS += examples/nsh
# The NSH application library
CONFIGURED_APPS += system/readline
CONFIGURED_APPS += nshlib
# The NX and NXHELLO examples configured as an NX built-in commands
# Various NX tests can be supported, simply comment-out examples/nx and
# uncomment the test you wish to perform
CONFIGURED_APPS += examples/nx
CONFIGURED_APPS += examples/nxhello
#CONFIGURED_APPS += examples/nxlines
#CONFIGURED_APPS += examples/nxtext
CONFIGURED_APPS += system/usbmsc
ifeq ($(CONFIG_I2C),y)
CONFIGURED_APPS += system/i2c
endif
# Applications configured as an NX built-in commands
ifeq ($(CONFIG_CAN),y)
CONFIGURED_APPS += examples/can
endif

File diff suppressed because it is too large Load Diff

View File

@ -46,9 +46,9 @@
* The driver dynamically selects the LCD based on the reported LCD ID value. However,
* code size can be reduced by suppressing support for individual LCDs using:
*
* CONFIG_STM32_AM240320_DISABLE
* CONFIG_STM32_SPFD5408B_DISABLE
* CONFIG_STM32_R61580_DISABLE
* CONFIG_STM3210E_AM240320_DISABLE
* CONFIG_STM3210E_SPFD5408B_DISABLE
* CONFIG_STM3210E_R61580_DISABLE
*
* Omitting the above (or setting them to "n") enables support for the LCD. Setting
* any of the above to "y" will disable support for the corresponding LCD.
@ -90,22 +90,22 @@
/* Backlight */
#ifndef CONFIG_LCD_BACKLIGHT
# undef CONFIG_LCD_PWM
#ifndef CONFIG_STM3210E_LCD_BACKLIGHT
# undef CONFIG_STM3210E_LCD_PWM
#endif
#if defined(CONFIG_LCD_BACKLIGHT) && defined(CONFIG_LCD_PWM)
#if defined(CONFIG_STM3210E_LCD_BACKLIGHT) && defined(CONFIG_STM3210E_LCD_PWM)
# if !defined(CONFIG_STM32_TIM1)
# warning "CONFIG_LCD_PWM requires CONFIG_STM32_TIM1"
# undef CONFIG_LCD_PWM
# warning "CONFIG_STM3210E_LCD_PWM requires CONFIG_STM32_TIM1"
# undef CONFIG_STM3210E_LCD_PWM
# endif
# if defined(CONFIG_STM32_TIM1_FULL_REMAP)
# warning "PA8 cannot be configured as TIM1 CH1 with full remap"
# undef CONFIG_LCD_PWM
# undef CONFIG_STM3210E_LCD_PWM
# endif
#endif
#if defined(CONFIG_LCD_BACKLIGHT) && defined(CONFIG_LCD_PWM)
#if defined(CONFIG_STM3210E_LCD_BACKLIGHT) && defined(CONFIG_STM3210E_LCD_PWM)
# if CONFIG_LCD_MAXPOWER < 2
# warning "A larger value of CONFIG_LCD_MAXPOWER is recommended"
# endif
@ -115,7 +115,7 @@
#if !defined(CONFIG_LCD_MAXPOWER) || CONFIG_LCD_MAXPOWER < 1
# undef CONFIG_LCD_MAXPOWER
# if defined(CONFIG_LCD_BACKLIGHT) && defined(CONFIG_LCD_PWM)
# if defined(CONFIG_STM3210E_LCD_BACKLIGHT) && defined(CONFIG_STM3210E_LCD_PWM)
# define CONFIG_LCD_MAXPOWER 100
# else
# define CONFIG_LCD_MAXPOWER 1
@ -128,8 +128,8 @@
/* PWM Frequency */
#ifndef CONFIG_LCD_PWMFREQUENCY
# define CONFIG_LCD_PWMFREQUENCY 100
#ifndef CONFIG_STM3210E_LCD_PWMFREQUENCY
# define CONFIG_STM3210E_LCD_PWMFREQUENCY 100
#endif
/* Check orientation */
@ -347,7 +347,7 @@ struct stm3210e_dev_s
struct lcd_dev_s dev;
#if defined(CONFIG_LCD_BACKLIGHT) && defined(CONFIG_LCD_PWM)
#if defined(CONFIG_STM3210E_LCD_BACKLIGHT) && defined(CONFIG_STM3210E_LCD_PWM)
uint32_t reload;
#endif
@ -367,7 +367,7 @@ static uint16_t stm3210e_readreg(uint8_t regaddr);
static inline void stm3210e_gramselect(void);
static inline void stm3210e_writegram(uint16_t rgbval);
static void stm3210e_readsetup(FAR uint16_t *accum);
#ifndef CONFIG_STM32_AM240320_DISABLE
#ifndef CONFIG_STM3210E_AM240320_DISABLE
static void stm3210e_readnosetup(FAR uint16_t *accum);
#endif
static uint16_t stm3210e_readshift(FAR uint16_t *accum);
@ -417,7 +417,7 @@ static int stm3210e_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate
/* Initialization */
static inline void stm3210e_lcdinitialize(void);
#ifdef CONFIG_LCD_BACKLIGHT
#ifdef CONFIG_STM3210E_LCD_BACKLIGHT
static void stm3210e_backlight(void);
#else
# define stm3210e_backlight()
@ -572,7 +572,7 @@ static inline void stm3210e_writegram(uint16_t rgbval)
/* Used for SPFD5408B and R61580 */
#if !defined(CONFIG_STM32_SPFD5408B_DISABLE) || !defined(CONFIG_STM32_R61580_DISABLE)
#if !defined(CONFIG_STM3210E_SPFD5408B_DISABLE) || !defined(CONFIG_STM3210E_R61580_DISABLE)
static void stm3210e_readsetup(FAR uint16_t *accum)
{
/* Read-ahead one pixel */
@ -583,7 +583,7 @@ static void stm3210e_readsetup(FAR uint16_t *accum)
/* Used only for AM240320 */
#ifndef CONFIG_STM32_AM240320_DISABLE
#ifndef CONFIG_STM3210E_AM240320_DISABLE
static void stm3210e_readnosetup(FAR uint16_t *accum)
{
}
@ -608,7 +608,7 @@ static void stm3210e_readnosetup(FAR uint16_t *accum)
* red and green
*/
#ifndef CONFIG_STM32_SPFD5408B_DISABLE
#ifndef CONFIG_STM3210E_SPFD5408B_DISABLE
static uint16_t stm3210e_readshift(FAR uint16_t *accum)
{
uint16_t red;
@ -663,7 +663,7 @@ static uint16_t stm3210e_readshift(FAR uint16_t *accum)
* swaps colors.
*/
#if !defined(CONFIG_STM32_R61580_DISABLE) || !defined(CONFIG_STM32_AM240320_DISABLE)
#if !defined(CONFIG_STM3210E_R61580_DISABLE) || !defined(CONFIG_STM3210E_AM240320_DISABLE)
static uint16_t stm3210e_readnoshift(FAR uint16_t *accum)
{
/* Read the value (GRAM register already selected) */
@ -839,21 +839,21 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
switch (g_lcddev.type)
{
#ifndef CONFIG_STM32_SPFD5408B_DISABLE
#ifndef CONFIG_STM3210E_SPFD5408B_DISABLE
case LCD_TYPE_SPFD5408B:
readsetup = stm3210e_readsetup;
readgram = stm3210e_readshift;
break;
#endif
#ifndef CONFIG_STM32_R61580_DISABLE
#ifndef CONFIG_STM3210E_R61580_DISABLE
case LCD_TYPE_R61580:
readsetup = stm3210e_readsetup;
readgram = stm3210e_readnoshift;
break;
#endif
#ifndef CONFIG_STM32_AM240320_DISABLE
#ifndef CONFIG_STM3210E_AM240320_DISABLE
case LCD_TYPE_AM240320:
readsetup = stm3210e_readnosetup;
readgram = stm3210e_readnoshift;
@ -1004,8 +1004,8 @@ static int stm3210e_poweroff(void)
/* Disable timer 1 clocking */
#if defined(CONFIG_LCD_BACKLIGHT)
# if defined(CONFIG_LCD_PWM)
#if defined(CONFIG_STM3210E_LCD_BACKLIGHT)
# if defined(CONFIG_STM3210E_LCD_PWM)
modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM1EN, 0);
#endif
@ -1042,7 +1042,7 @@ static int stm3210e_setpower(struct lcd_dev_s *dev, int power)
if (power > 0)
{
#if defined(CONFIG_LCD_BACKLIGHT) && defined(CONFIG_LCD_PWM)
#if defined(CONFIG_STM3210E_LCD_BACKLIGHT) && defined(CONFIG_STM3210E_LCD_PWM)
uint32_t frac;
uint32_t duty;
@ -1080,8 +1080,8 @@ static int stm3210e_setpower(struct lcd_dev_s *dev, int power)
#endif
/* Then turn the display on */
#ifndef CONFIG_STM32_AM240320_DISABLE
# if !defined (CONFIG_STM32_SPFD5408B_DISABLE) || !defined(CONFIG_STM32_R61580_DISABLE)
#ifndef CONFIG_STM3210E_AM240320_DISABLE
# if !defined (CONFIG_STM3210E_SPFD5408B_DISABLE) || !defined(CONFIG_STM3210E_R61580_DISABLE)
stm3210e_writereg(LCD_REG_7, g_lcddev.type == LCD_TYPE_AM240320 ? 0x0173 : 0x0112);
# else
stm3210e_writereg(LCD_REG_7, 0x0173);
@ -1154,7 +1154,7 @@ static int stm3210e_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
#ifdef CONFIG_PM
static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate)
{
#ifdef CONFIG_LCD_PWM
#ifdef CONFIG_STM3210E_LCD_PWM
uint32_t frac;
uint32_t duty;
#endif
@ -1165,7 +1165,7 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat
{
/* Restore normal LCD operation */
#ifdef CONFIG_LCD_PWM
#ifdef CONFIG_STM3210E_LCD_PWM
frac = (g_lcddev.power << 16) / CONFIG_LCD_MAXPOWER;
duty = (g_lcddev.reload * frac) >> 16;
if (duty > 0)
@ -1182,7 +1182,7 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat
{
/* Entering IDLE mode - Reduce LCD light */
#ifdef CONFIG_LCD_PWM
#ifdef CONFIG_STM3210E_LCD_PWM
frac = (g_lcddev.power << 16) / CONFIG_LCD_MAXPOWER;
duty = (g_lcddev.reload * frac) >> 16;
if (duty > 0)
@ -1202,7 +1202,7 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat
{
/* Entering STANDBY mode - Turn display backlight off */
#ifdef CONFIG_LCD_PWM
#ifdef CONFIG_STM3210E_LCD_PWM
putreg16(0, STM32_TIM1_CCR1);
#endif
}
@ -1320,7 +1320,7 @@ static inline void stm3210e_lcdinitialize(void)
/* Check if the ID is for the SPFD5408B */
#if !defined(CONFIG_STM32_SPFD5408B_DISABLE)
#if !defined(CONFIG_STM3210E_SPFD5408B_DISABLE)
if (id == SPFD5408B_ID)
{
/* Set the LCD type for the SPFD5408B */
@ -1425,7 +1425,7 @@ static inline void stm3210e_lcdinitialize(void)
/* Check if the ID is for the almost compatible R61580 */
#if !defined(CONFIG_STM32_R61580_DISABLE)
#if !defined(CONFIG_STM3210E_R61580_DISABLE)
if (id == R61580_ID)
{
/* Set the LCD type for the R61580 */
@ -1497,7 +1497,7 @@ static inline void stm3210e_lcdinitialize(void)
else
#endif
{
#ifndef CONFIG_STM32_AM240320_DISABLE
#ifndef CONFIG_STM3210E_AM240320_DISABLE
/* Set the LCD type for the AM240320 */
g_lcddev.type = LCD_TYPE_AM240320;
@ -1605,10 +1605,10 @@ static inline void stm3210e_lcdinitialize(void)
*
**************************************************************************************/
#ifdef CONFIG_LCD_BACKLIGHT
#ifdef CONFIG_STM3210E_LCD_BACKLIGHT
static void stm3210e_backlight(void)
{
#ifdef CONFIG_LCD_PWM
#ifdef CONFIG_STM3210E_LCD_PWM
uint32_t prescaler;
uint32_t reload;
uint32_t timclk;
@ -1619,7 +1619,7 @@ static void stm3210e_backlight(void)
/* Calculate the TIM1 prescaler value */
prescaler = (STM32_PCLK2_FREQUENCY / CONFIG_LCD_PWMFREQUENCY + 65534) / 65535;
prescaler = (STM32_PCLK2_FREQUENCY / CONFIG_STM3210E_LCD_PWMFREQUENCY + 65534) / 65535;
if (prescaler < 1)
{
prescaler = 1;
@ -1632,7 +1632,7 @@ static void stm3210e_backlight(void)
/* Calculate the TIM1 reload value */
timclk = STM32_PCLK2_FREQUENCY / prescaler;
reload = timclk / CONFIG_LCD_PWMFREQUENCY;
reload = timclk / CONFIG_STM3210E_LCD_PWMFREQUENCY;
if (reload < 1)
{