TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
TM_ILI9341_Functions

Library Functions. More...

Functions

void TM_ILI9341_Init (void)
 Initializes ILI9341 LCD with LTDC peripheral It also initializes external SDRAM. More...
 
void TM_ILI9341_DrawPixel (uint16_t x, uint16_t y, uint32_t color)
 Draws single pixel to LCD. More...
 
void TM_ILI9341_Fill (uint32_t color)
 Fills entire LCD with color. More...
 
void TM_ILI9341_Rotate (TM_ILI9341_Orientation_t orientation)
 Rotates LCD to specific orientation. More...
 
void TM_ILI9341_Putc (uint16_t x, uint16_t y, char c, TM_FontDef_t *font, uint32_t foreground, uint32_t background)
 Puts single character to LCD. More...
 
void TM_ILI9341_Puts (uint16_t x, uint16_t y, char *str, TM_FontDef_t *font, uint32_t foreground, uint32_t background)
 Puts string to LCD. More...
 
void TM_ILI9341_GetStringSize (char *str, TM_FontDef_t *font, uint16_t *width, uint16_t *height)
 Gets width and height of box with text. More...
 
void TM_ILI9341_DrawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
 Draws line to LCD. More...
 
void TM_ILI9341_DrawRectangle (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
 Draws rectangle on LCD. More...
 
void TM_ILI9341_DrawFilledRectangle (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
 Draws filled rectangle on LCD. More...
 
void TM_ILI9341_DrawCircle (int16_t x0, int16_t y0, int16_t r, uint32_t color)
 Draws circle on LCD. More...
 
void TM_ILI9341_DrawFilledCircle (int16_t x0, int16_t y0, int16_t r, uint32_t color)
 Draws filled circle on LCD. More...
 
void TM_ILI9341_DisplayOn (void)
 Enables display. More...
 
void TM_ILI9341_DisplayOff (void)
 Disables display. More...
 

Detailed Description

Library Functions.

Function Documentation

void TM_ILI9341_DisplayOff ( void  )

Disables display.

Parameters
None
Return values
None
void TM_ILI9341_DisplayOn ( void  )

Enables display.

Note
After initialization, LCD is enabled and you don't need to call this function
Parameters
None
Return values
None
void TM_ILI9341_DrawCircle ( int16_t  x0,
int16_t  y0,
int16_t  r,
uint32_t  color 
)

Draws circle on LCD.

Parameters
x0X coordinate of center circle point
y0Y coordinate of center circle point
rCircle radius
colorCircle color
Return values
None
void TM_ILI9341_DrawFilledCircle ( int16_t  x0,
int16_t  y0,
int16_t  r,
uint32_t  color 
)

Draws filled circle on LCD.

Parameters
x0X coordinate of center circle point
y0Y coordinate of center circle point
rCircle radius
colorCircle color
Return values
None
void TM_ILI9341_DrawFilledRectangle ( uint16_t  x0,
uint16_t  y0,
uint16_t  x1,
uint16_t  y1,
uint32_t  color 
)

Draws filled rectangle on LCD.

Parameters
x0X coordinate of top left point
y0Y coordinate of top left point
x1X coordinate of bottom right point
y1Y coordinate of bottom right point
colorRectangle color
Return values
None
void TM_ILI9341_DrawLine ( uint16_t  x0,
uint16_t  y0,
uint16_t  x1,
uint16_t  y1,
uint32_t  color 
)

Draws line to LCD.

Parameters
x0X coordinate of starting point
y0Y coordinate of starting point
x1X coordinate of ending point
y1Y coordinate of ending point
colorLine color
Return values
None
void TM_ILI9341_DrawPixel ( uint16_t  x,
uint16_t  y,
uint32_t  color 
)

Draws single pixel to LCD.

Parameters
xX position for pixel
yY position for pixel
colorColor of pixel
Return values
None
void TM_ILI9341_DrawRectangle ( uint16_t  x0,
uint16_t  y0,
uint16_t  x1,
uint16_t  y1,
uint32_t  color 
)

Draws rectangle on LCD.

Parameters
x0X coordinate of top left point
y0Y coordinate of top left point
x1X coordinate of bottom right point
y1Y coordinate of bottom right point
colorRectangle color
Return values
None
void TM_ILI9341_Fill ( uint32_t  color)

Fills entire LCD with color.

Parameters
colorColor to be used in fill
Return values
None
void TM_ILI9341_GetStringSize ( char *  str,
TM_FontDef_t font,
uint16_t *  width,
uint16_t *  height 
)

Gets width and height of box with text.

Parameters
*strPointer to first character
*fontPointer to TM_FontDef_t used font
*widthPointer to variable to store width
*heightPointer to variable to store height
Return values
None
void TM_ILI9341_Init ( void  )

Initializes ILI9341 LCD with LTDC peripheral It also initializes external SDRAM.

Parameters
None
Return values
None
void TM_ILI9341_Putc ( uint16_t  x,
uint16_t  y,
char  c,
TM_FontDef_t font,
uint32_t  foreground,
uint32_t  background 
)

Puts single character to LCD.

Parameters
xX position of top left corner
yY position of top left corner
cCharacter to be displayed
*fontPointer to TM_FontDef_t used font
foregroundColor for char
backgroundColor for char background
Return values
None
void TM_ILI9341_Puts ( uint16_t  x,
uint16_t  y,
char *  str,
TM_FontDef_t font,
uint32_t  foreground,
uint32_t  background 
)

Puts string to LCD.

Parameters
xX position of top left corner of first character in string
yY position of top left corner of first character in string
*strPointer to first character
*fontPointer to TM_FontDef_t used font
foregroundColor for string
backgroundColor for string background
Return values
None
void TM_ILI9341_Rotate ( TM_ILI9341_Orientation_t  orientation)

Rotates LCD to specific orientation.

Parameters
orientationLCD orientation. This parameter can be a value of TM_ILI9341_Orientation_t enumeration
Return values
None