LCD.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /****************************************Copyright (c)**************************************************
  2. * File Name: Lcd.h
  3. * Function Describe: Header file for Lcd.c
  4. * Explain:
  5. * Writer: ShiLiangWen
  6. * Date: 2016-1-8
  7. ********************************************************************************************************/
  8. #ifndef __LCD_H
  9. #define __LCD_H
  10. //-------------------------------------------------------------------------------------------------------
  11. #include "stm32f10x.h"
  12. #define LCD_WIDTH 160
  13. #define LCD_HIGH 128
  14. #define COLOR_BLACK 0x0000
  15. #define COLOR_WHITE 0xFFFF
  16. #define COLOR_RED 0xF800
  17. #define COLOR_GREEN 0x07E0
  18. #define COLOR_BLUE 0x001F
  19. extern u16 g_usBackColor; //嘘尚冲弼
  20. extern u16 g_usColor; //念尚弼、鮫永冲弼
  21. void LcdSetColor(u16 BrushColor,u16 BackColor);
  22. void LcdBlockWrite(u16 x1,u16 y1,u16 x2,u16 y2);
  23. void LcdSendData(unsigned char Data);
  24. void LcdInit(void);
  25. void LcdClrAll(void);
  26. void LcdSetColor(u16 BrushColor,u16 BackColor);
  27. void LcdTest(u16);
  28. void LcdShowStr(u16 x, u16 y,const char *string,u8 mode);
  29. void LcdDrawVLine(u16 y1, u16 y2, u16 x, u8 width);
  30. void LcdClearRect(u16 xl, u16 yl, u16 xr, u16 yr);
  31. void LcdDrawRect(u16 x1, u16 y1, u16 x2, u16 y2,u8 width);
  32. //-------------------------------------------------------------------------------------------------------
  33. #endif
  34. /*********************************************************************************************************
  35. END FILE
  36. *********************************************************************************************************/