9
0
Fork 0

Mostly cosmetic, partial fixes for STM3240G-EVAL LCD

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4705 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-05-07 01:40:39 +00:00
parent d7d0f7a5cd
commit 7c688dd2cd
6 changed files with 36 additions and 20 deletions

View File

@ -464,9 +464,16 @@ examples/lcdrw
^^^^^^^^^^^^^^
This example may be used to verify if you can or cannot read data
correct from an LCD interface. At present, this supports only LCDs
correctly from an LCD interface. At present, this supports only LCDs
with RGB565 color format.
* CONFIG_EXAMPLES_LDCRW_DEVNO
LCD device number. Default: 0
* CONFIG_EXAMPLES_LDCRW_XRES
LCD X resolution. Default: 240
* CONFIG_EXAMPLES_LDCRW_YRES
LCD Y resolution. Default: 320
examples/mm
^^^^^^^^^^^

View File

@ -179,7 +179,7 @@ int MAIN_NAME(int argc, char *argv[])
exit(1);
}
/* Then read each line from the LCD and write to the TIFF file */
/* Loop, writing all possible values to the LCD */
value = 0;
for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
@ -214,10 +214,7 @@ int MAIN_NAME(int argc, char *argv[])
}
printf("---f\n");
/* Then read each line back from the LCD (this would hook into
* the TIFF file creation library *very* easily to create a
* TIFF file of the returned values).
*/
/* Then read each line back from the LCD. */
offset = 0;
for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)

View File

@ -2708,6 +2708,6 @@
position, not an offset.
* graphics/nxtk/nxtk_drawframe.c: Framed windows are now drawn in three
colors (instead of just two).
* drivers/input/stmpe11_*: Beginning of a driver to support STMicro STMPE11
* drivers/input/stmpe11_*: Added a driver to support the STMicro STMPE11
IO Expander and touchscreen driver.

View File

@ -1081,6 +1081,21 @@ Where <subdir> is one of the following:
CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows
CONFIG_LCD_LANDSCAPE=y : 320x240 landscape
nxwm
----
This is a special configuration setup for the NxWM window manager
UnitTest. The NxWM window manager can be found here:
trunk/NxWidgets/nxwm
The NxWM unit test can be found at:
trunk/NxWidgets/UnitTests/nxwm
Documentation for installing the NxWM unit test can be found here:
trunk/NxWidgets/UnitTests/READEM.txt
ostest:
------
This configuration directory, performs a simple OS test using

View File

@ -101,7 +101,7 @@
# error "Cannot define both rportrait and any other orientations"
# endif
#elif defined(CONFIG_LCD_LANDSCAPE)
# ifdef defined(CONFIG_LCD_RLANDSCAPE)
# ifdef CONFIG_LCD_RLANDSCAPE
# error "Cannot define both landscape and any other orientations"
# endif
#elif !defined(CONFIG_LCD_RLANDSCAPE)
@ -141,8 +141,8 @@
/* STM3240G-EVAL LCD Hardware Definitions *********************************************/
/* LCD /CS is CE4, Bank 3 of NOR/SRAM Bank 1~4 */
#define STM3240G_LCDBASE ((uint32_t)(0x60000000 | 0x08000000))
#define LCD ((struct lcd_regs_s *) STM3240G_LCDBASE)
#define STM3240G_LCDBASE ((uintptr_t)(0x60000000 | 0x08000000))
#define LCD ((struct lcd_regs_s *)STM3240G_LCDBASE)
#define LCD_REG_0 0x00
#define LCD_REG_1 0x01
@ -488,12 +488,15 @@ static inline void stm3240g_writegram(uint16_t rgbval)
* this LCD type. When reading 16-bit gram data, there may be some shifts in the
* returned data:
*
* - ILI932x: Unknown -- assuming no shift in the return data
* - ILI932x: Discard first dummy read; no shift in the return data
*
**************************************************************************************/
static void stm3240g_readnosetup(FAR uint16_t *accum)
{
/* Read-ahead one pixel */
*accum = LCD->value;
}
/**************************************************************************************
@ -507,14 +510,12 @@ static void stm3240g_readnosetup(FAR uint16_t *accum)
*
**************************************************************************************/
#if !defined(CONFIG_STM32_ILI9320_DISABLE) || !defined(CONFIG_STM32_ILI9325_DISABLE)
static uint16_t stm3240g_readnoshift(FAR uint16_t *accum)
{
/* Read the value (GRAM register already selected) */
return LCD->value;
}
#endif
/**************************************************************************************
* Name: stm3240g_setcursor
@ -593,11 +594,7 @@ static int stm3240g_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu
* the STM3240G-EVAL is used as the top.
*/
/* Set the cursor position */
stm3240g_setcursor(col, row);
/* Then write the GRAM data, manually incrementing X */
/* Write the GRAM data, manually incrementing X */
for (i = 0; i < npixels; i++)
{

View File

@ -132,12 +132,12 @@ uint16_t stmpe11_tempread(STMPE11_HANDLE handle)
stmpe11_putreg8(priv, STMPE11_TEMP_CTRL, (TEMP_CTRL_ACQ|TEMP_CTRL_ENABLE));
/* Read the tempreature */
/* Read the temperature */
temp1 = stmpe11_getreg8(priv, STMPE11_SYS_CTRL2);
temp2 = stmpe11_getreg8(priv, STMPE11_SYS_CTRL2+1);
/* Scale the tempreature */
/* Scale the temperature (where Vio is assumed to be .33) */
temp = ((uint32_t)(temp1 & 3) << 8) | temp2;
temp = (uint32_t)((33 * temp * 100) / 751);