Advertisement
Guest User

LCDfail

a guest
Jul 31st, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1.  
  2. #include "stm32fxxx_hal.h"
  3.  
  4. #include "defines.h"
  5. #include "tm_stm32_disco.h"
  6. #include "tm_stm32_delay.h"
  7. #include "tm_stm32_lcd.h"
  8.  
  9.  
  10. TM_FONT_SIZE_t FontSize;
  11.  
  12.  
  13. #if defined(STM32F7_DISCOVERY)
  14. char str[] = "This is LCD driver for F7-Discovery board";
  15. #elif defined(STM32F439_EVAL)
  16. char str[] = "This is LCD driver for F439-Eval board";
  17. #elif defined(STM32F429_DISCOVERY)
  18. char str[] = "F429-Discovery board";
  19. #endif
  20.  
  21. int x=0;
  22. int y=0;
  23. long z=0;
  24. int q=0;
  25.  
  26.  
  27. TIM_HandleTypeDef TIM_Handle;
  28.  
  29. uint32_t zaehl=0;
  30.  
  31. int main(void) {
  32.  
  33.  
  34. TM_RCC_InitSystem();
  35. HAL_Init();
  36. TM_LCD_Init();
  37. TM_LCD_Fill(0x0000);
  38. TM_LCD_SetFont(&TM_Font_16x26);
  39.  
  40.  
  41. TM_LCD_SetXY((TM_LCD_GetWidth() - FontSize.Width) / 2, (TM_LCD_GetHeight() - FontSize.Height)*2);
  42. TM_LCD_Puts("Systemtest");
  43.  
  44.  
  45.  
  46. while (1) {
  47.  
  48.  
  49. zaehl=zaehl+1;
  50.  
  51.  
  52.  
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement