stm32100b_eval_lcd.c File Reference

This file includes the LCD driver for AM-240320LTNQW00H (LCD_HX8312), AM-240320L8TNQW00H (LCD_ILI9320), AM-240320LDTNQW00H (LCD_SPFD5408B) Liquid Crystal Display Module of STM32100B-EVAL board. More...

#include "stm32100b_eval_lcd.h"
#include "stm32f10x.h"
#include "../Common/fonts.h"
#include "fonts.h"

Go to the source code of this file.

Defines

#define ABS(X)   ((X) > 0 ? (X) : -(X))
#define LCD_HX8312   0x8312
#define LCD_ILI9320   0x9320
#define LCD_READ_REG   0x03
#define LCD_SPFD5408   0x5408
#define LCD_WRITE_REG   0x02
#define MAX_POLY_CORNERS   200
#define POLY_X(Z)   ((int32_t)((Points + Z)->Y))
#define POLY_Y(Z)   ((int32_t)((Points + Z)->X))
#define READ_STATUS   0x01
#define SET_INDEX   0x00
#define START_BYTE   0x70

Functions

static void delay (vu32 nCount)
 Inserts a delay time.
void LCD_Clear (uint16_t Color)
 Clears the hole LCD.
void LCD_ClearLine (uint8_t Line)
 Clears the selected line.
void LCD_ClosedPolyLine (pPoint Points, uint16_t PointCount)
 Displays a closed polyline (between many points).
void LCD_ClosedPolyLineRelative (pPoint Points, uint16_t PointCount)
 Displays a closed relative polyline (between many points).
void LCD_CtrlLinesConfig (void)
 Configures LCD control lines in Output Push-Pull mode.
void LCD_CtrlLinesWrite (GPIO_TypeDef *GPIOx, uint16_t CtrlPins, BitAction BitVal)
 Sets or reset LCD control lines.
void LCD_DeInit (void)
 DeInitializes the LCD.
void LCD_DisplayChar (uint8_t Line, uint16_t Column, uint8_t Ascii)
 Displays one character (16dots width, 24dots height).
void LCD_DisplayOff (void)
 Disables the Display.
void LCD_DisplayOn (void)
 Enables the Display.
void LCD_DisplayStringLine (uint8_t Line, uint8_t *ptr)
 Displays a maximum of 20 char on the LCD.
void LCD_DrawChar (uint8_t Xpos, uint16_t Ypos, const uint16_t *c)
 Draws a character on LCD.
void LCD_DrawCircle (uint8_t Xpos, uint16_t Ypos, uint16_t Radius)
 Displays a circle.
void LCD_DrawFullCircle (uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
 Displays a full circle.
void LCD_DrawFullRect (uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
 Displays a full rectangle.
void LCD_DrawLine (uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction)
 Displays a line.
void LCD_DrawMonoPict (const uint32_t *Pict)
 Displays a monocolor picture.
void LCD_DrawRect (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
 Displays a rectangle.
void LCD_DrawUniLine (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 Displays an uni line (between two points).
void LCD_FillPolyLine (pPoint Points, uint16_t PointCount)
 Displays a full polyline (between many points).
void LCD_GetColors (__IO uint16_t *_TextColor, __IO uint16_t *_BackColor)
 Gets the LCD Text and Background colors.
sFONTLCD_GetFont (void)
 Gets the Text Font.
void LCD_nCS_StartByte (uint8_t Start_Byte)
 Reset LCD control line(/CS) and Send Start-Byte.
void LCD_PolyLine (pPoint Points, uint16_t PointCount)
 Displays an polyline (between many points).
void LCD_PolyLineRelative (pPoint Points, uint16_t PointCount)
 Displays a relative polyline (between many points).
static void LCD_PolyLineRelativeClosed (pPoint Points, uint16_t PointCount, uint16_t Closed)
 Displays an relative polyline (between many points).
void LCD_PowerOn (void)
 Power on the LCD.
uint16_t LCD_ReadReg (uint8_t LCD_Reg)
 Reads the selected LCD Register.
void LCD_SetBackColor (__IO uint16_t Color)
 Sets the Background color.
void LCD_SetColors (__IO uint16_t _TextColor, __IO uint16_t _BackColor)
 Sets the LCD Text and Background colors.
void LCD_SetCursor (uint8_t Xpos, uint16_t Ypos)
 Sets the cursor position.
void LCD_SetDisplayWindow (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
 Sets a display window.
void LCD_SetFont (sFONT *fonts)
 Sets the Text Font.
void LCD_SetTextColor (__IO uint16_t Color)
 Sets the Text color.
void LCD_Setup (void)
 Setups the LCD.
void LCD_SPIConfig (void)
 Configures the LCD_SPI interface.
void LCD_WindowModeDisable (void)
 Disables LCD Window mode.
void LCD_WriteRAM (uint16_t RGB_Code)
 Writes to the LCD RAM.
void LCD_WriteRAM_Prepare (void)
 Prepare to write to the LCD RAM.
void LCD_WriteRAMWord (uint16_t RGB_Code)
 Writes 1 word to the LCD RAM.
void LCD_WriteReg (uint8_t LCD_Reg, uint16_t LCD_RegValue)
 Writes to the selected LCD register.
static void LCD_WriteRegHX8312 (uint8_t LCD_Reg, uint8_t LCD_RegValue)
 Writes to the selected LCD HX8312 register.
static void LCD_WriteRegILI9320 (uint8_t LCD_Reg, uint16_t LCD_RegValue)
 Writes to the selected LCD ILI9320 register.
void LCD_WriteRegIndex (uint8_t LCD_Reg)
 Writes index to select the LCD register.
static void PutPixel (int16_t x, int16_t y)
 Displays a pixel.
void STM32100B_LCD_Init (void)
 Initializes the LCD.

Variables

static __IO uint16_t BackColor = 0xFFFF
static sFONTLCD_Currentfonts
static __IO uint32_t LCDType = LCD_ILI9320
static __IO uint16_t TextColor = 0x0000

Detailed Description

This file includes the LCD driver for AM-240320LTNQW00H (LCD_HX8312), AM-240320L8TNQW00H (LCD_ILI9320), AM-240320LDTNQW00H (LCD_SPFD5408B) Liquid Crystal Display Module of STM32100B-EVAL board.

Author:
MCD Application Team
Version:
V4.3.0
Date:
10/15/2010

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2010 STMicroelectronics

Definition in file stm32100b_eval_lcd.c.

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32