SAM3S8/SD8 Software Package: libraries/libboard_sam3s-ek2/include/ili9325.h File Reference

SAM3S8/SD8 Software Package 1.2
Defines | Typedefs | Functions

# ili9325.h File Reference

`#include "board.h"`
`#include <stdint.h>`

Go to the source code of this file.

## Defines

#define | ILI9325_DEVICE_CODE 0x9325
#define | ILI9325_R00H 0x00
#define | ILI9325_R01H 0x01
#define | ILI9325_R01H_SS ((uint16_t)0x0100)
#define | ILI9325_R01H_SM ((uint16_t)0x0400)
#define | ILI9325_R02H 0x02
#define | ILI9325_R03H 0x03
#define | ILI9325_R03H_AM ((uint16_t)0x0008)
#define | ILI9325_R03H_ID0 ((uint16_t)0x0010)
#define | ILI9325_R03H_ID1 ((uint16_t)0x0020)
#define | ILI9325_R03H_ORG ((uint16_t)0x0080)
#define | ILI9325_R03H_HWM ((uint16_t)0x0200)
#define | ILI9325_R03H_BGR ((uint16_t)0x1000)
#define | ILI9325_R03H_DFM ((uint16_t)0x4000)
#define | ILI9325_R03H_TRI ((uint16_t)0x8000)
#define | ILI9325_R04H 0x04
#define | ILI9325_R07H 0x07
#define | ILI9325_R07H_D0 ((uint16_t)0x0001)
#define | ILI9325_R07H_D1 ((uint16_t)0x0002)
#define | ILI9325_R07H_CL ((uint16_t)0x0008)
#define | ILI9325_R07H_DTE ((uint16_t)0x0010)
#define | ILI9325_R07H_GON ((uint16_t)0x0020)
#define | ILI9325_R07H_BASEE ((uint16_t)0x0100)
#define | ILI9325_R07H_PTDE0 ((uint16_t)0x1000)
#define | ILI9325_R07H_PTDE1 ((uint16_t)0x2000)
#define | ILI9325_R08H 0x08
#define | ILI9325_R09H 0x09
#define | ILI9325_R0AH 0x0A
#define | ILI9325_R0CH 0x0C
#define | ILI9325_R0DH 0x0D
#define | ILI9325_R0FH 0x0F
#define | ILI9325_R10H 0x10
#define | ILI9325_R11H 0x11
#define | ILI9325_R12H 0x12
#define | ILI9325_R13H 0x13
#define | ILI9325_R20H 0x20
#define | ILI9325_R21H 0x21
#define | ILI9325_R22H 0x22
#define | ILI9325_R29H 0x29
#define | ILI9325_R2BH 0x2B
#define | ILI9325_R30H 0x30
#define | ILI9325_R31H 0x31
#define | ILI9325_R32H 0x32
#define | ILI9325_R35H 0x35
#define | ILI9325_R36H 0x36
#define | ILI9325_R37H 0x37
#define | ILI9325_R38H 0x38
#define | ILI9325_R39H 0x39
#define | ILI9325_R3CH 0x3C
#define | ILI9325_R3DH 0x3D
#define | ILI9325_R50H 0x50
#define | ILI9325_R51H 0x51
#define | ILI9325_R52H 0x52
#define | ILI9325_R53H 0x53
#define | ILI9325_R60H 0x60
#define | ILI9325_R60H_GS ((uint16_t)0x8000)
#define | ILI9325_R61H 0x61
#define | ILI9325_R6AH 0x6A
#define | ILI9325_R80H 0x80
#define | ILI9325_R81H 0x81
#define | ILI9325_R82H 0x82
#define | ILI9325_R83H 0x83
#define | ILI9325_R84H 0x84
#define | ILI9325_R85H 0x85
#define | ILI9325_R90H 0x90
#define | ILI9325_R92H 0x92
#define | ILI9325_R95H 0x95
#define | ILI9325_RA1H 0xA1
#define | ILI9325_RA2H 0xA2
#define | ILI9325_RA5H 0xA5
#define | LCD_IR() (*((REG8 *)(BOARD_LCD_BASE)))
#define | LCD_SR() (*((REG8 *)(BOARD_LCD_BASE)))
#define | LCD_D() (*((REG8 *)((uint32_t)(BOARD_LCD_BASE) + BOARD_LCD_RS)))

## Typedefs

typedef uint32_t | LcdColor_t
typedef volatile uint8_t | REG8

## Functions

void | LCD_WriteRAM_Prepare (void)
| Prepare to write GRAM data.
void | LCD_WriteRAM (LcdColor_t dwColor)
| Write data to LCD GRAM.
void | LCD_ReadRAM_Prepare (void)
| Prepare to read GRAM data.
uint32_t | LCD_ReadRAM (void)
| Read data to LCD GRAM.
uint32_t | LCD_Initialize (void)
| Initialize the LCD controller.
void | LCD_On (void)
| Turn on the LCD.
void | LCD_Off (void)
| Turn off the LCD.
void | LCD_PowerDown (void)
| Power down the LCD.
uint32_t | LCD_SetColor (uint32_t dwRgb24Bits)
| Convert 24 bit RGB color into 5-6-5 rgb color space.
void | LCD_SetCursor (uint16_t x, uint16_t y)
| Set cursor of LCD srceen.
void | LCD_SetWindow (uint32_t dwX, uint32_t dwY, uint32_t dwWidth, uint32_t dwHeight)
void | LCD_SetDisplayLandscape (uint32_t dwRGB)
void | LCD_SetDisplayPortrait (uint32_t dwRGB)
void | LCD_VerticalScroll (uint16_t wY)
void | LCD_SetPartialImage1 (uint32_t dwDisplayPos, uint32_t dwStart, uint32_t dwEnd)
void | LCD_SetPartialImage2 (uint32_t dwDisplayPos, uint32_t dwStart, uint32_t dwEnd)
uint32_t | LCD_DrawPixel (uint32_t x, uint32_t y)
| Draw a LcdColor_t on LCD of given color.
void | LCD_TestPattern (uint32_t dwRGB)
uint32_t | LCD_DrawFilledRectangle (uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2)
| Write several pixels with the same color to LCD GRAM.
uint32_t | LCD_DrawPicture (uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2, const LcdColor_t *pBuffer)
| Write several pixels pre-formatted in a bufer to LCD GRAM.
uint32_t | LCD_DrawLine (uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2)
uint32_t | LCD_DrawCircle (uint32_t dwX, uint32_t dwY, uint32_t dwR)
| Draws a circle on LCD, at the given coordinates.
uint32_t | LCD_DrawFilledCircle (uint32_t dwX, uint32_t dwY, uint32_t dwRadius)
uint32_t | LCD_DrawRectangle (uint32_t dwX1, uint32_t dwY1, uint32_t dwX2, uint32_t dwY2)
void | LCD_SetBacklight (uint32_t level)
| Set the backlight of the LCD (AAT3155).

## Detailed Description

Interface of ILI9325 driver.

Definition in file ili9325.h.

## Define Documentation

#define LCD_D | ( | ) | (*((REG8 *)((uint32_t)(BOARD_LCD_BASE) + BOARD_LCD_RS)))

LCD data address

Definition at line 151 of file ili9325.h.

#define LCD_IR | ( | ) | (*((REG8 *)(BOARD_LCD_BASE)))

LCD index register address

Definition at line 147 of file ili9325.h.

#define LCD_SR | ( | ) | (*((REG8 *)(BOARD_LCD_BASE)))

LCD status register address

Definition at line 149 of file ili9325.h.

## Function Documentation

uint32_t LCD_DrawCircle | ( | uint32_t | dwX,
|  | uint32_t | dwY,
|  | uint32_t | dwR
| ) |  |

Draws a circle on LCD, at the given coordinates.

Parameters:

  dwX | X-coordinate of circle center.
  dwY | Y-coordinate of circle center.
  dwR | circle radius.

Definition at line 777 of file ili9325.c.

Here is the call graph for this function:

uint32_t LCD_DrawFilledRectangle | ( | uint32_t | dwX1,
|  | uint32_t | dwY1,
|  | uint32_t | dwX2,
|  | uint32_t | dwY2
| ) |  |

Write several pixels with the same color to LCD GRAM.

LcdColor_t color is set by the LCD_SetColor() function. This function is optimized using an sram buffer to transfer block instead of individual pixels in order to limit the number of SPI interrupts.

Parameters:

  dwX1 | X-coordinate of upper-left corner on LCD.
  dwY1 | Y-coordinate of upper-left corner on LCD.
  dwX2 | X-coordinate of lower-right corner on LCD.
  dwY2 | Y-coordinate of lower-right corner on LCD.

Definition at line 574 of file ili9325.c.

Here is the call graph for this function:

uint32_t LCD_DrawPicture | ( | uint32_t | dwX1,
|  | uint32_t | dwY1,
|  | uint32_t | dwX2,
|  | uint32_t | dwY2,
|  | const LcdColor_t * | pBuffer
| ) |  |

Write several pixels pre-formatted in a bufer to LCD GRAM.

Parameters:

  dwX1 | X-coordinate of upper-left corner on LCD.
  dwY1 | Y-coordinate of upper-left corner on LCD.
  dwX2 | X-coordinate of lower-right corner on LCD.
  dwY2 | Y-coordinate of lower-right corner on LCD.
  pBuffer | LcdColor_t buffer area.

Definition at line 623 of file ili9325.c.

Here is the call graph for this function:

uint32_t LCD_DrawPixel | ( | uint32_t | x,
|  | uint32_t | y
| ) |  |

Draw a LcdColor_t on LCD of given color.

Parameters:

  x | X-coordinate of pixel.
  y | Y-coordinate of pixel.

Definition at line 474 of file ili9325.c.

Here is the call graph for this function:

uint32_t LCD_ReadRAM | ( | void | ) |

Read data to LCD GRAM.

Note:
  Because pixel data LCD GRAM is 18-bits, so convertion to RGB 24-bits will cause low color bit lose.

Returns:
  color 24-bits RGB color.

Definition at line 149 of file ili9325.c.

void LCD_SetBacklight | ( | uint32_t | level ) |

Set the backlight of the LCD (AAT3155).

Parameters:

  level | Backlight brightness level [1..16], 1 means maximum brightness.

Definition at line 877 of file ili9325.c.

Here is the call graph for this function:

uint32_t LCD_SetColor | ( | uint32_t | dwRgb24Bits ) |

Convert 24 bit RGB color into 5-6-5 rgb color space.

Initialize the LcdColor_t cache with the color pattern.

Parameters:

  x | 24-bits RGB color.

Returns:
  0 for successfull operation.

Definition at line 346 of file ili9325.c.

void LCD_SetCursor | ( | uint16_t | x,
|  | uint16_t | y
| ) |  |

Set cursor of LCD srceen.

Parameters:

  x | X-coordinate of upper-left corner on LCD.
  y | Y-coordinate of upper-left corner on LCD.

Definition at line 365 of file ili9325.c.

void LCD_WriteRAM | ( | LcdColor_t | dwColor ) |

Write data to LCD GRAM.

Parameters:

  color | 24-bits RGB color.

Definition at line 109 of file ili9325.c.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines