fork of original freetronics library

Dependents:   AwsomeStation

Fork of Freetronics_16x2_LCD by Components

Committer:
KKempeneers
Date:
Tue Oct 08 08:46:39 2013 +0000
Revision:
0:01f3d38f8b6d
Child:
1:ddcefddda4a7
First attempt at publishing a library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
KKempeneers 0:01f3d38f8b6d 1 #define LEFT 0
KKempeneers 0:01f3d38f8b6d 2 #define RIGHT 1
KKempeneers 0:01f3d38f8b6d 3
KKempeneers 0:01f3d38f8b6d 4 class freetronicsLCDShield : public Stream {
KKempeneers 0:01f3d38f8b6d 5 private:
KKempeneers 0:01f3d38f8b6d 6 // Functions
KKempeneers 0:01f3d38f8b6d 7 void writeByte (int byte);
KKempeneers 0:01f3d38f8b6d 8 void writeCommand (int command);
KKempeneers 0:01f3d38f8b6d 9 void writeData (int data);
KKempeneers 0:01f3d38f8b6d 10 void character(int line, int col, int value);
KKempeneers 0:01f3d38f8b6d 11
KKempeneers 0:01f3d38f8b6d 12 // Hardware
KKempeneers 0:01f3d38f8b6d 13 DigitalOut _rs, _e;
KKempeneers 0:01f3d38f8b6d 14 BusOut _d;
KKempeneers 0:01f3d38f8b6d 15 PwmOut _bl;
KKempeneers 0:01f3d38f8b6d 16 AnalogIn _a0;
KKempeneers 0:01f3d38f8b6d 17
KKempeneers 0:01f3d38f8b6d 18 public:
KKempeneers 0:01f3d38f8b6d 19 // Constructor
KKempeneers 0:01f3d38f8b6d 20 freetronicsLCDShield (PinName rs = PTA13,
KKempeneers 0:01f3d38f8b6d 21 PinName e = PTD5,
KKempeneers 0:01f3d38f8b6d 22 PinName d0 = PTA4,
KKempeneers 0:01f3d38f8b6d 23 PinName d1 = PTA5,
KKempeneers 0:01f3d38f8b6d 24 PinName d2 = PTC8,
KKempeneers 0:01f3d38f8b6d 25 PinName d3 = PTC9,
KKempeneers 0:01f3d38f8b6d 26 PinName bl = PTA12,
KKempeneers 0:01f3d38f8b6d 27 PinName a0 = PTB0);
KKempeneers 0:01f3d38f8b6d 28
KKempeneers 0:01f3d38f8b6d 29 void setCursorPosition (int line, int col);
KKempeneers 0:01f3d38f8b6d 30 void setBackLight (bool blStatus);
KKempeneers 0:01f3d38f8b6d 31 void setBackLight (float blIntensity);
KKempeneers 0:01f3d38f8b6d 32 void setCursor (bool cStatus, bool blink = false);
KKempeneers 0:01f3d38f8b6d 33 void shift (bool left);
KKempeneers 0:01f3d38f8b6d 34 void cls (void);
KKempeneers 0:01f3d38f8b6d 35 void home(void);
KKempeneers 0:01f3d38f8b6d 36
KKempeneers 0:01f3d38f8b6d 37 float readButton(void);
KKempeneers 0:01f3d38f8b6d 38
KKempeneers 0:01f3d38f8b6d 39 protected:
KKempeneers 0:01f3d38f8b6d 40 // Stream implementation functions
KKempeneers 0:01f3d38f8b6d 41 virtual int _putc(int value);
KKempeneers 0:01f3d38f8b6d 42 virtual int _getc();
KKempeneers 0:01f3d38f8b6d 43 };