-nil-
Fork of SLCD by
Diff: SLCD.h
- Revision:
- 3:f70873bc6121
- Parent:
- 1:1579bcd31410
- Child:
- 4:ec7b3c9b2aeb
--- a/SLCD.h Mon Jan 20 21:08:32 2014 +0000 +++ b/SLCD.h Mon Jan 27 21:57:38 2014 +0000 @@ -1,36 +1,44 @@ -#ifndef SLCD_H -#define SLCD_H - #include "mbed.h" +/* ------ sample usage------ + + #include "mbed.h" + #include "SLCD.h" + + SLCD slcd; + + main() + { + slcd.printf("1234"); // standard printf function, only charaters in ASCII_TO_WF_CODIFICATION_TABLE will display + slcd.putc("A"); // prints a single character + slcd.Write_Char('A'); // prints a single character + slcd.All_Segments(y); // y=1 for ALL segments on, 0 for ALL segments off + slcd.DPx(y); // x=DP1 to DP3, y=1 for on 0 for off + slcd.Colon(y); // y=1 for on, 0 for off + slcd.CharPosition=x; // x=0 to 3, 0 is start position + slcd.Home(); // sets next charater to posistion 0 (start) + slcd.Contrast (x); // set contrast x=0 - 15, 0 lightest, 15 darkest + } +*/ + class SLCD : public Stream { public: SLCD(); void init(); - void EnablePins(); - void LCD_Write_Char(char lbValue); - void SetBackplanes(void); // reconfigure COM to default values - void LCD_Home (void); - void LCD_Contrast (uint8_t lbContrast); - void LCD_All_Segments_ON (void); - void LCD_All_Segments_OFF (void); - void DP1_ON (void); - void DP1_OFF (void); - void DP2_ON (void); - void DP2_OFF (void); - void DP3_ON (void); - void DP3_OFF (void); - void COLON_ON (void); - void COLON_OFF (void); - - uint8_t lcd_alternate_mode; - uint8_t bLCD_CharPosition; + void Write_Char(char lbValue); + void Home (void); + void Contrast (uint8_t lbContrast); + void All_Segments (int); + void DP1 (int); + void DP2 (int); + void DP3 (int); + void Colon (int); + uint8_t CharPosition; virtual int _putc(int c); virtual int _getc() { return 0; } }; -#endif \ No newline at end of file