Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of AkiSpiLcd by
Revision 22:5ac00ac2a4be, committed 2016-05-11
- Comitter:
- Chris
- Date:
- Wed May 11 11:58:05 2016 +0100
- Parent:
- 21:8de1035017b5
- Commit message:
- change to lcdconf
Changed in this revision
AkiSpiLcd.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/AkiSpiLcd.cpp Tue May 10 19:55:20 2016 +0000 +++ b/AkiSpiLcd.cpp Wed May 11 11:58:05 2016 +0100 @@ -4,6 +4,7 @@ #include "mbed.h" #include "AkiSpiLcd.h" +#include "LCDConf.h" //#include "Ser23K256.h" extern const uint8_t lcd_line[]; @@ -70,7 +71,13 @@ _spi.write((uint8_t)lcd_line[line+1]); for(int i=0; i<_width/8; i++) { + if(RBIT){ _spi.write( *(data+i) ); + } + else + { + _spi.write(__RBIT( *(data+i) )>>24); + } } _spi.write(0x00); _spi.write(0x00); @@ -94,9 +101,14 @@ _spi.write((uint8_t)lcd_line[line+1]); for(int i=0; i<_width/8; i++) { - //_spi.write( *(data+(_width/8*j+i)) ); - _spi.write(__RBIT( *(data+(((_width/8)*j)+i)))>>24 ); - } + if(RBIT){ + _spi.write(__RBIT( *(data+(((_width/8)*j)+i)))>>24 ); + } + else + { + _spi.write( *(data+(_width/8*j+i)) ); + } + } line+=1; } _spi.write(0x00);