Had to create default object constructors so that it can be used with the Vodafone library and the mbed rtos when creating dynamic objects on the heap.
Fork of TextLCD by
Revision 1:cb0d67c3953d, committed 2013-07-30
- Comitter:
- nherriot
- Date:
- Tue Jul 30 13:11:35 2013 +0000
- Parent:
- 0:ec079a141883
- Commit message:
- Creating default constructor with a void type.
Changed in this revision
TextLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
TextLCD.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r ec079a141883 -r cb0d67c3953d TextLCD.cpp --- a/TextLCD.cpp Fri Jul 27 15:06:59 2012 +0000 +++ b/TextLCD.cpp Tue Jul 30 13:11:35 2013 +0000 @@ -39,9 +39,15 @@ * _rs is set by the data/command writes */ -TextLCD::TextLCD(PinName rs, PinName rw, PinName e, PinName d0, PinName d1, - PinName d2, PinName d3, int columns, int rows) : _rw(rw), _rs(rs), - _e(e), _d(d0, d1, d2, d3), _columns(columns), _rows(rows) { +TextLCD::TextLCD(void): _rw(p18), _rs(p19), _e(p20), _d(p17, p16, p15, p14), _columns(16), _rows(2) +{ + +// nothing much happens here in my default constructor +} + + +TextLCD::TextLCD(PinName rs, PinName rw, PinName e, PinName d0, PinName d1, PinName d2, PinName d3, int columns, int rows) + : _rw(rw), _rs(rs), _e(e), _d(d0, d1, d2, d3), _columns(columns), _rows(rows) { // _rows = 2; // _columns = 16;
diff -r ec079a141883 -r cb0d67c3953d TextLCD.h --- a/TextLCD.h Fri Jul 27 15:06:59 2012 +0000 +++ b/TextLCD.h Tue Jul 30 13:11:35 2013 +0000 @@ -46,6 +46,7 @@ * e - enable * d0..d3 - The data lines */ + TextLCD(void); TextLCD(PinName rs, PinName rw, PinName e, PinName d0, PinName d1, PinName d2, PinName d3, int columns = 16, int rows = 2);