Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stm32f4xx.h"
- #include "stm32f429i_discovery.h"
- #include "stm32f4xx_spi.h"
- #include "tm_stm32f4_ili9341.h"
- #include "tm_stm32f4_fonts.h"
- #include "tm_stm32f4_delay.h"
- #include <stdio.h>
- int tic = 60;
- char *tekst;
- void LCD_draw()
- {
- tekst = "noclue";
- //Put string with black foreground color and blue background with 11x18px font
- TM_ILI9341_Puts(65, 130, tekst, &TM_Font_11x18, ILI9341_COLOR_BLACK, ILI9341_COLOR_BLUE2);
- TM_ILI9341_Puts(60, 150, sprintf(tekst, "%d", tic), &TM_Font_11x18, ILI9341_COLOR_BLACK, ILI9341_COLOR_BLUE2);
- }
- int main(void) {
- //Initialize system
- SystemInit();
- //Initialize ILI9341
- TM_ILI9341_Init();
- //FIll lcd with color
- TM_ILI9341_Fill(ILI9341_COLOR_GRAY);
- LCD_draw();
- while (1)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement