mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
Export a fast but non-standard way to clear the STM3210E-EVAL LCD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3916 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+1157
-1016
File diff suppressed because it is too large
Load Diff
@@ -240,6 +240,21 @@ EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Name: stm3210e_lcdclear
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* This is a non-standard LCD interface just for the STM3210E-EVAL board. Because
|
||||||
|
* of the various rotations, clearing the display in the normal way by writing a
|
||||||
|
* sequences of runs that covers the entire display can be very slow. Here the
|
||||||
|
* dispaly is cleared by simply setting all GRAM memory to the specified color.
|
||||||
|
*
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_FSMC
|
||||||
|
EXTERN void stm3210e_lcdclear(uint16_t color);
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,8 @@
|
|||||||
#include <nuttx/spi.h>
|
#include <nuttx/spi.h>
|
||||||
#include <nuttx/lcd/lcd.h>
|
#include <nuttx/lcd/lcd.h>
|
||||||
|
|
||||||
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "stm32.h"
|
#include "stm32.h"
|
||||||
#include "stm32_internal.h"
|
#include "stm32_internal.h"
|
||||||
@@ -354,7 +356,6 @@ static int stm3210e_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
|
|||||||
/* Initialization */
|
/* Initialization */
|
||||||
|
|
||||||
static inline void stm3210e_lcdinitialize(void);
|
static inline void stm3210e_lcdinitialize(void);
|
||||||
static inline void stm3210e_lcdclear(void);
|
|
||||||
#ifdef CONFIG_LCD_BACKLIGHT
|
#ifdef CONFIG_LCD_BACKLIGHT
|
||||||
static void stm3210e_backlight(void);
|
static void stm3210e_backlight(void);
|
||||||
#else
|
#else
|
||||||
@@ -1059,26 +1060,6 @@ static inline void stm3210e_lcdinitialize(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Name: stm3210e_lcdclear
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Clear GRAM
|
|
||||||
*
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
static inline void stm3210e_lcdclear(void)
|
|
||||||
{
|
|
||||||
uint32_t i = 0;
|
|
||||||
|
|
||||||
stm3210e_setcursor(0, STM3210E_XRES-1);
|
|
||||||
stm3210e_gramselect();
|
|
||||||
for (i = 0; i < STM3210E_XRES * STM3210E_YRES; i++)
|
|
||||||
{
|
|
||||||
LCD->value = 0; /* Black */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Name: stm3210e_backlight
|
* Name: stm3210e_backlight
|
||||||
*
|
*
|
||||||
@@ -1230,9 +1211,9 @@ int up_lcdinitialize(void)
|
|||||||
up_mdelay(50);
|
up_mdelay(50);
|
||||||
stm3210e_lcdinitialize();
|
stm3210e_lcdinitialize();
|
||||||
|
|
||||||
/* Clear the display */
|
/* Clear the display (setting it to the color 0=black) */
|
||||||
|
|
||||||
stm3210e_lcdclear();
|
stm3210e_lcdclear(0);
|
||||||
|
|
||||||
/* Configure the backlight */
|
/* Configure the backlight */
|
||||||
|
|
||||||
@@ -1269,3 +1250,26 @@ void up_lcduninitialize(void)
|
|||||||
stm32_deselectlcd();
|
stm32_deselectlcd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************************
|
||||||
|
* Name: stm3210e_lcdclear
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* This is a non-standard LCD interface just for the STM3210E-EVAL board. Because
|
||||||
|
* of the various rotations, clearing the display in the normal way by writing a
|
||||||
|
* sequences of runs that covers the entire display can be very slow. Here the
|
||||||
|
* dispaly is cleared by simply setting all GRAM memory to the specified color.
|
||||||
|
*
|
||||||
|
**************************************************************************************/
|
||||||
|
|
||||||
|
void stm3210e_lcdclear(uint16_t color)
|
||||||
|
{
|
||||||
|
uint32_t i = 0;
|
||||||
|
|
||||||
|
stm3210e_setcursor(0, STM3210E_XRES-1);
|
||||||
|
stm3210e_gramselect();
|
||||||
|
for (i = 0; i < STM3210E_XRES * STM3210E_YRES; i++)
|
||||||
|
{
|
||||||
|
LCD->value = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -203,7 +203,7 @@ cp -f "${ARCHDIR}"/*.h "${EXPORTDIR}"/arch/. 2>/dev/null
|
|||||||
# as symbolic links to directories, then copy the header files from
|
# as symbolic links to directories, then copy the header files from
|
||||||
# those directories into the EXPORTDIR
|
# those directories into the EXPORTDIR
|
||||||
|
|
||||||
ARCH_HDRDIRS="common chip arm armv7-m avr avr32 mips32"
|
ARCH_HDRDIRS="arm armv7-m avr avr32 board common chip mips32"
|
||||||
for hdir in $ARCH_HDRDIRS; do
|
for hdir in $ARCH_HDRDIRS; do
|
||||||
|
|
||||||
# Does the directory (or symbolic link) exist?
|
# Does the directory (or symbolic link) exist?
|
||||||
|
|||||||
Reference in New Issue
Block a user