v1
Dependents: ACC_LCD_541_Goniometer_Dorian_Folie
Fork of SLCD by
Diff: SLCD.h
- Revision:
- 10:ef2b3b7f1b01
- Parent:
- 9:dae947a658f0
--- a/SLCD.h Sun Mar 23 19:10:10 2014 +0000 +++ b/SLCD.h Sun Mar 23 19:55:14 2014 +0000 @@ -27,20 +27,55 @@ } */ +/** +* SLCD peripheral of the FRDM-KL46Z\n +Inherits mbed::Stream and supports the majority of Stream functions. + +@code +#include "mbed.h" +#include "SLCD.h" + +SLCD slcd; + +main() +{ + slcd.Home(); // Moves cursor to position 0 (start) + slcd.printf("1.2.3.4"); // Standard printf function, only characters in ASCII_TO_WF_CODIFICATION_TABLE will display + // Dots printed using decimal points + slcd.putc('A'); // Prints a single character + + while(1); // Wait forever +} +@endcode +*/ class SLCD : public Stream { public: + //! Construct an SLCD object SLCD(); - void Home (void); + //! Move the SLCD cursor to the first character + void Home(); + /** + * Set contrast + * @param lbContrast 0 - 15, 0 lightest, 15 darkest + */ void Contrast (uint8_t lbContrast); void All_Segments (int); + //! Turn off all segments void clear(); + /** + * Turn a decimal point on or off + * @param pos decimal point position: 0-2 + * @param on True or False + */ void DP(int pos, bool on); void DP1 (int); void DP2 (int); void DP3 (int); - void Colon (int); + //! Turn the colon symbol on or off + void Colon (bool on); + //! Current cursor position uint8_t CharPosition; void blink(int blink = 3); void deepsleepEnable(bool enable);