31 #define TM_ILI9341_H 130
126 #include "stm32f4xx.h"
127 #include "stm32f4xx_rcc.h"
128 #include "stm32f4xx_gpio.h"
130 #include "tm_stm32f4_fonts.h"
131 #include "tm_stm32f4_gpio.h"
132 #include "tm_stm32f4_spi.h"
133 #include "tm_stm32f4_dma.h"
134 #include "tm_stm32f4_spi_dma.h"
146 #define ILI9341_SPI SPI5
147 #define ILI9341_SPI_PINS TM_SPI_PinsPack_1
153 #ifndef ILI9341_CS_PIN
154 #define ILI9341_CS_PORT GPIOC
155 #define ILI9341_CS_PIN GPIO_PIN_2
161 #ifndef ILI9341_WRX_PIN
162 #define ILI9341_WRX_PORT GPIOD
163 #define ILI9341_WRX_PIN GPIO_PIN_13
169 #ifndef ILI9341_RST_PIN
170 #define ILI9341_RST_PORT GPIOD
171 #define ILI9341_RST_PIN GPIO_PIN_12
175 #define ILI9341_WIDTH 240
176 #define ILI9341_HEIGHT 320
177 #define ILI9341_PIXEL 76800
180 #define ILI9341_COLOR_WHITE 0xFFFF
181 #define ILI9341_COLOR_BLACK 0x0000
182 #define ILI9341_COLOR_RED 0xF800
183 #define ILI9341_COLOR_GREEN 0x07E0
184 #define ILI9341_COLOR_GREEN2 0xB723
185 #define ILI9341_COLOR_BLUE 0x001F
186 #define ILI9341_COLOR_BLUE2 0x051D
187 #define ILI9341_COLOR_YELLOW 0xFFE0
188 #define ILI9341_COLOR_ORANGE 0xFBE4
189 #define ILI9341_COLOR_CYAN 0x07FF
190 #define ILI9341_COLOR_MAGENTA 0xA254
191 #define ILI9341_COLOR_GRAY 0x7BEF
192 #define ILI9341_COLOR_BROWN 0xBBCA
195 #define ILI9341_TRANSPARENT 0x80000000
302 void TM_ILI9341_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color);
void TM_ILI9341_Rotate(TM_ILI9341_Orientation_t orientation)
Rotates LCD to specific orientation.
TM_ILI9341_Orientation_t
Possible orientations for LCD.
Definition: tm_stm32f4_ili9341.h:211
Definition: tm_stm32f4_ili9341.h:213
void TM_ILI9341_DisplayOn(void)
Enables display.
void TM_ILI9341_DrawCircle(int16_t x0, int16_t y0, int16_t r, uint32_t color)
Draws circle 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_GetStringSize(char *str, TM_FontDef_t *font, uint16_t *width, uint16_t *height)
Gets width and height of box with text.
void TM_ILI9341_DisplayOff(void)
Disables display.
Definition: tm_stm32f4_ili9341.h:212
void TM_ILI9341_Fill(uint32_t color)
Fills entire LCD with color.
Definition: tm_stm32f4_ili9341.h:214
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_Init(void)
Initializes ILI9341 LCD with LTDC peripheral It also initializes external SDRAM.
void TM_ILI9341_DrawFilledRectangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
Draws filled rectangle on LCD.
void TM_ILI9341_DrawFilledCircle(int16_t x0, int16_t y0, int16_t r, uint32_t color)
Draws filled circle on LCD.
void TM_ILI9341_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t color)
Draws line to LCD.
void TM_ILI9341_DrawPixel(uint16_t x, uint16_t y, uint32_t color)
Draws single pixel to LCD.
Definition: tm_stm32f4_ili9341.h:215
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.
Font structure used on my LCD libraries.
Definition: tm_stm32f4_fonts.h:89