LCD表示
Dependents: LCDprint_HELLOMBED kumitate batteryReamid LCDModeChangeRemocon ... more
Diff: TextLCD.cpp
- Revision:
- 42:fc3e73087a75
- Parent:
- 41:111ca62e8a59
--- 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