diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-05-16 16:52:04 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-05-16 16:52:04 +0000 |
commit | 694de4eb08b74ddea49c85716f452ddd33a15925 (patch) | |
tree | e7ce99f5070575f1a12ebb767c544db78f323f2c /nuttx/drivers/lcd/p14201.c | |
parent | 5634f4a9b27ec9601e8dc807dd54bc26f06f1cf6 (diff) | |
download | px4-nuttx-694de4eb08b74ddea49c85716f452ddd33a15925.tar.gz px4-nuttx-694de4eb08b74ddea49c85716f452ddd33a15925.tar.bz2 px4-nuttx-694de4eb08b74ddea49c85716f452ddd33a15925.zip |
Misc OLED-related bug fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2681 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/lcd/p14201.c')
-rwxr-xr-x | nuttx/drivers/lcd/p14201.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/drivers/lcd/p14201.c b/nuttx/drivers/lcd/p14201.c index d59136029..6c05bacbf 100755 --- a/nuttx/drivers/lcd/p14201.c +++ b/nuttx/drivers/lcd/p14201.c @@ -173,9 +173,9 @@ /* Debug ******************************************************************************/ #ifdef CONFIG_LCD_RITDEBUG -# define ritdbg(format, arg...) vdbg(format, ##arg) +# define ritdbg(format, arg...) vdbg(format, ##arg) #else -# define ritdbg(x...) +# define ritdbg(x...) #endif /************************************************************************************** @@ -1068,7 +1068,7 @@ static int rit_getpower(FAR struct lcd_dev_s *dev) DEBUGASSERT(priv); gvdbg("power: %s\n", priv->on ? "ON" : "OFF"); - return (int)priv->on; + return priv->on ? CONFIG_LCD_MAXPOWER : 0; } /************************************************************************************** @@ -1102,12 +1102,14 @@ static int rit_setpower(struct lcd_dev_s *dev, int power) /* Take the display out of sleep mode */ rit_sndcmd(priv, g_sleepoff, sizeof(g_sleepoff)); + priv->on = true; } else { /* Put the display into sleep mode */ rit_sndcmd(priv, g_sleepon, sizeof(g_sleepon)); + priv->on = false; } /* De-select the SD1329 controller */ |