Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.79 KB | None | 0 0
  1. #include "stm32f4xx.h"
  2. #include "stm32f429i_discovery.h"
  3. #include "stm32f4xx_spi.h"
  4. #include "tm_stm32f4_ili9341.h"
  5. #include "tm_stm32f4_fonts.h"
  6. #include "tm_stm32f4_delay.h"
  7. #include <stdio.h>
  8.  
  9. int tic = 60;
  10. char *tekst;
  11.  
  12. void LCD_draw()
  13. {
  14.     tekst = "noclue";
  15.     //Put string with black foreground color and blue background with 11x18px font
  16.     TM_ILI9341_Puts(65, 130, tekst, &TM_Font_11x18, ILI9341_COLOR_BLACK, ILI9341_COLOR_BLUE2);
  17.     TM_ILI9341_Puts(60, 150, sprintf(tekst, "%d", tic), &TM_Font_11x18, ILI9341_COLOR_BLACK, ILI9341_COLOR_BLUE2);
  18. }
  19.  
  20. int main(void) {
  21.     //Initialize system
  22.     SystemInit();
  23.  
  24.     //Initialize ILI9341
  25.     TM_ILI9341_Init();
  26.  
  27.     //FIll lcd with color
  28.     TM_ILI9341_Fill(ILI9341_COLOR_GRAY);
  29.  
  30.     LCD_draw();
  31.  
  32.     while (1)
  33.     {
  34.  
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement