30 #ifndef TM_ILI9341_LTDC_H
31 #define TM_ILI9341_LTDC_H 140
99 #include "stm32f4xx.h"
100 #include "stm32f4xx_rcc.h"
101 #include "stm32f4xx_gpio.h"
102 #include "stm32f4xx_ltdc.h"
104 #include "tm_stm32f4_spi.h"
105 #include "tm_stm32f4_fonts.h"
106 #include "tm_stm32f4_sdram.h"
107 #include "tm_stm32f4_gpio.h"
119 #define ILI9341_SPI SPI5
120 #define ILI9341_SPI_PINS TM_SPI_PinsPack_1
126 #ifndef ILI9341_CS_PIN
127 #define ILI9341_CS_PORT GPIOC
128 #define ILI9341_CS_PIN GPIO_PIN_2
134 #ifndef ILI9341_WRX_PIN
135 #define ILI9341_WRX_PORT GPIOD
136 #define ILI9341_WRX_PIN GPIO_PIN_13
142 #define ILI9341_COLOR_WHITE 0xFFFF
143 #define ILI9341_COLOR_BLACK 0x0000
144 #define ILI9341_COLOR_RED 0xF800
145 #define ILI9341_COLOR_GREEN 0x07E0
146 #define ILI9341_COLOR_GREEN2 0xB723
147 #define ILI9341_COLOR_BLUE 0x001F
148 #define ILI9341_COLOR_BLUE2 0x051D
149 #define ILI9341_COLOR_YELLOW 0xFFE0
150 #define ILI9341_COLOR_ORANGE 0xFBE4
151 #define ILI9341_COLOR_CYAN 0x07FF
152 #define ILI9341_COLOR_MAGENTA 0xA254
153 #define ILI9341_COLOR_GRAY 0x7BEF
154 #define ILI9341_COLOR_BROWN 0xBBCA
161 #define ILI9341_TRANSPARENT 0x80000000
266 void TM_ILI9341_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color);
void TM_ILI9341_DrawFilledCircle(int16_t x0, int16_t y0, int16_t r, uint32_t color)
Draws filled circle on LCD.
void TM_ILI9341_DrawFilledRectangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
Draws filled rectangle on LCD.
TM_ILI9341_Orientation_t
Possible orientations for LCD.
Definition: tm_stm32f4_ili9341_ltdc.h:176
void TM_ILI9341_GetStringSize(char *str, TM_FontDef_t *font, uint16_t *width, uint16_t *height)
Gets width and height of box with text.
void TM_ILI9341_Fill(uint32_t color)
Fills entire LCD with color.
void TM_ILI9341_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
Draws line to LCD.
TM_ILI9341_Orientation_t
Possible orientations for LCD.
Definition: tm_stm32f4_ili9341.h:211
void TM_ILI9341_Rotate(TM_ILI9341_Orientation_t orientation)
Rotates LCD to specific orientation.
void TM_ILI9341_DrawRoundedRectangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t r, uint32_t color)
Draws rounded rectangle on LCD.
void TM_ILI9341_SetLayer2(void)
Sets layer 2 to currently active layer.
void TM_ILI9341_Layer1To2(void)
Copies content of layer 1 to layer 2.
void TM_ILI9341_DrawFilledRoundedRectangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t r, uint32_t color)
Draws filled rounded rectangle on LCD.
Definition: tm_stm32f4_ili9341_ltdc.h:178
void TM_ILI9341_Layer2To1(void)
Copies content of layer 2 to layer 1.
void TM_ILI9341_DrawCircle(int16_t x0, int16_t y0, int16_t r, uint32_t color)
Draws circle on LCD.
void TM_ILI9341_SetLayer1(void)
Sets layer 2 to currently active layer.
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.
Definition: tm_stm32f4_ili9341_ltdc.h:177
void TM_ILI9341_DisplayOff(void)
Disables display.
void TM_ILI9341_SetLayer1Opacity(uint8_t opacity)
Sets layer 1 opacity.
void TM_ILI9341_DrawPixel(uint16_t x, uint16_t y, uint32_t color)
Draws single pixel to LCD.
void TM_ILI9341_DisplayOn(void)
Enables display.
Definition: tm_stm32f4_ili9341_ltdc.h:179
void TM_ILI9341_SetLayer2Opacity(uint8_t opacity)
Sets layer 2 opacity.
void TM_ILI9341_DrawRectangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
Draws rectangle on LCD.
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.
void TM_ILI9341_ChangeLayers(void)
This changes current active layer It sets transparency to 0 and 255 depends on which layer is selecte...
Definition: tm_stm32f4_ili9341_ltdc.h:180
void TM_ILI9341_Init(void)
Initializes ILI9341 LCD with LTDC peripheral It also initializes external SDRAM.
Font structure used on my LCD libraries.
Definition: tm_stm32f4_fonts.h:89