daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Nov 22nd, 2015 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. float tic = 1.1654;
  10. char buf[20];
  11. const int time = 1000;
  12.  
  13. void LCD_draw()
  14. {
  15.         sprintf(buf,"tic %d",tic);
  16.         //Put string with black foreground color and blue background with 11x18px font
  17.         TM_ILI9341_Puts(65, 130, buf, &TM_Font_11x18, ILI9341_COLOR_BLACK, ILI9341_COLOR_BLUE2);
  18. }
  19.  
  20. int main(void) {
  21.     //Initialize system
  22.     SystemInit();
  23.  
  24.     //Initlialize Systick timer
  25.     TM_DELAY_Init();
  26.  
  27.     //Initialize ILI9341
  28.     TM_ILI9341_Init();
  29.  
  30.     //FIll lcd with color
  31.     TM_ILI9341_Fill(ILI9341_COLOR_GRAY);
  32.     LCD_draw();
  33.  
  34.     while (1)
  35.     {
  36.         /*
  37.         LCD_draw();
  38.         Delayms(time);
  39.         tic+=1.1;
  40.         */
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top