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.
Dependents: LCDprint_HELLOMBED kumitate batteryReamid LCDModeChangeRemocon ... more
Revision 42:fc3e73087a75, committed 2020-07-10
- Comitter:
- nishimura_taku_pet
- Date:
- Fri Jul 10 08:47:57 2020 +0000
- Parent:
- 41:111ca62e8a59
- Commit message:
- first commit
Changed in this revision
| TextLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
| TextLCD_Config.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/TextLCD.cpp Fri Nov 06 18:59:27 2015 +0000
+++ b/TextLCD.cpp Fri Jul 10 08:47:57 2020 +0000
@@ -3441,7 +3441,9 @@
// Write data to MCP23008 I2C portexpander
// Used for mbed I2C bus expander
void TextLCD_I2C::_writeRegister (int reg, int value) {
- char data[] = {reg, value};
+ char data[2];
+ data[0] = reg;
+ data[1] = value;
_i2c->write(_slaveAddress, data, 2);
}
@@ -3735,7 +3737,9 @@
// RW=0 means write to controller. RW=1 means that controller will be read from after the next command.
// Many native I2C controllers dont support this option and it is not used by this lib.
//
- char data[] = {_controlbyte, value};
+ char data[2];
+ data[0] = _controlbyte;
+ data[1] = value;
#if(LCD_I2C_ACK==1)
//Controllers that support ACK
--- a/TextLCD_Config.h Fri Nov 06 18:59:27 2015 +0000 +++ b/TextLCD_Config.h Fri Jul 10 08:47:57 2020 +0000 @@ -68,10 +68,10 @@ //LCD and serial portexpanders should be wired according to the tables below. // //Select Serial Port Expander Hardware module (one option only) -#define DEFAULT 1 +#define DEFAULT 0 #define ADAFRUIT 0 #define DFROBOT 0 -#define LCM1602 0 +#define LCM1602 1 #define YWROBOT 0 #define GYLCD 0 #define MJKDZ 0