#ifndef SED1520_H
#define SED1520_H


// LCD Refresh clock (in Hz)
//
#define LCD_CLOCK       2000

// The brightness PWM signal is derived from the LCD_CLOCK.
// Some displays have constraints on the duty cycle of the
// clock signal, so the minimum and maximum duty cycles can be
// set by LCD_MINPWMON and LCD_MINPWMOFF (in timer ticks)
//
// NOTE:
//   If you have problems with your LCD, you should try
//   higher PWM values first!! I had a real debugging
//   nightmare, when i got random pixels on my display,
//   only to find out, that the timing was too tight..
//
//   50 and 10 should do for any SED1520 driven display,
//   while still allowing brightness control between 4 and
//   99.2% (i even tried heating it with a hairdryer,
//   because the displays get slower when they're warm :)
//
#define LCD_MINPWMON      50
#define LCD_MINPWMOFF     10


// Width and height of the display
//
#define LCD_WIDTH        122
#define LCD_HEIGHT        32

extern  void  LCD_Init();
extern  void  LCD_Done();

extern  char *LCD_GetScreenBuffer();
extern  void  LCD_Clear();
extern  void  LCD_Update();

extern  void  LCD_SetBrightness(int level);

#endif