display.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* ========================================================================
  2. * [PROJECT] SIR100
  3. * [MODULE] Display
  4. * [TITLE] display header file
  5. * [FILE] display.h
  6. * [VSN] 1.0
  7. * [CREATED] 030414
  8. * [LASTCHNGD] 030414
  9. * [COPYRIGHT] Copyright (C) STREAMIT BV 2010
  10. * [PURPOSE] API and gobal defines for display module
  11. * ======================================================================== */
  12. #ifndef _Display_H
  13. #define _Display_H
  14. /*-------------------------------------------------------------------------*/
  15. /* global defines */
  16. /*-------------------------------------------------------------------------*/
  17. #define DISPLAY_SIZE 16
  18. #define NROF_LINES 2
  19. #define MAX_SCREEN_CHARS (NROF_LINES*DISPLAY_SIZE)
  20. #define LINE_0 0
  21. #define LINE_1 1
  22. #define FIRSTPOS_LINE_0 0
  23. #define FIRSTPOS_LINE_1 0x40
  24. #define LCD_BACKLIGHT_ON 1
  25. #define LCD_BACKLIGHT_OFF 0
  26. #define startLCD 1
  27. #define stopLCD 0
  28. #define ALL_ZERO 0x00 // 0000 0000 B
  29. #define WRITE_COMMAND 0x02 // 0000 0010 B
  30. #define WRITE_DATA 0x03 // 0000 0011 B
  31. #define READ_COMMAND 0x04 // 0000 0100 B
  32. #define READ_DATA 0x06 // 0000 0110 B
  33. /*-------------------------------------------------------------------------*/
  34. /* typedefs & structs */
  35. /*-------------------------------------------------------------------------*/
  36. /*--------------------------------------------------------------------------*/
  37. /* Global variables */
  38. /*--------------------------------------------------------------------------*/
  39. /*-------------------------------------------------------------------------*/
  40. /* export global routines (interface) */
  41. /*-------------------------------------------------------------------------*/
  42. extern void LcdChar(char);
  43. extern void LcdBackLight(u_char);
  44. extern void LcdInit(void);
  45. extern void LcdLowLevelInit(void);
  46. extern void ClearLcd(void);
  47. extern void LcdArrayLineOne(char*, int);
  48. extern void LcdArrayLineTwo(char*, int);
  49. extern void setXCursorPos(int,int);
  50. extern char getLoop(char*,int);
  51. #endif /* _Display_H */
  52. /* ���� End Of File �������� �������������������������������������������� */