summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm3210e-eval/src/up_lcd.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-27 00:14:38 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-27 00:14:38 +0000
commita1f510576ad37d88d0985cf0ede02135c466d3a2 (patch)
treea685efd6a9a049173f2c1a75e7edf83472f455e8 /nuttx/configs/stm3210e-eval/src/up_lcd.c
parent14cfaf0623701b5b34b0da62bf7b55fd8cfaa7d2 (diff)
downloadpx4-nuttx-a1f510576ad37d88d0985cf0ede02135c466d3a2.tar.gz
px4-nuttx-a1f510576ad37d88d0985cf0ede02135c466d3a2.tar.bz2
px4-nuttx-a1f510576ad37d88d0985cf0ede02135c466d3a2.zip
PM update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4982 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3210e-eval/src/up_lcd.c')
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_lcd.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/up_lcd.c b/nuttx/configs/stm3210e-eval/src/up_lcd.c
index 42da4864a..045f564c3 100644
--- a/nuttx/configs/stm3210e-eval/src/up_lcd.c
+++ b/nuttx/configs/stm3210e-eval/src/up_lcd.c
@@ -2,9 +2,13 @@
* configs/stm3210e-eval/src/up_lcd.c
* arch/arm/src/board/up_lcd.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
+ * With power management enhancements by:
+ *
+ * Author: Diego Sanchez <dsanchez@nx-engineering.com>
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -1187,7 +1191,7 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat
duty--;
}
- /* Reduce the LCD light to 50% of the MAXPOWER */
+ /* Reduce the LCD backlight to 50% of the MAXPOWER */
duty >>= 1;
putreg16((uint16_t)duty, STM32_TIM1_CCR1);
@@ -1197,7 +1201,7 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat
case(PM_STANDBY):
{
- /* Entering STANDBY mode - Turn display off */
+ /* Entering STANDBY mode - Turn display backlight off */
#ifdef CONFIG_LCD_PWM
putreg16(0, STM32_TIM1_CCR1);
@@ -1207,8 +1211,9 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat
case(PM_SLEEP):
{
- /* Entering SLEEP mode - Logic for PM_SLEEP goes here */
+ /* Entering SLEEP mode - Turn off LCD */
+ (void)stm3210e_poweroff();
}
break;