for my students
Revision 43:0462e3d255bc, committed 2020-07-10
- Comitter:
- docent
- Date:
- Fri Jul 10 08:51:43 2020 +0000
- Parent:
- 42:ca39baa33d4f
- Commit message:
- for my snudents
Changed in this revision
--- a/TextLCD.cpp Fri Dec 07 05:27:20 2018 +0000
+++ b/TextLCD.cpp Fri Jul 10 08:51:43 2020 +0000
@@ -3198,7 +3198,7 @@
}
//----------- End TextLCD ---------------
-
+
//--------- Start TextLCD_I2C -----------
#if(LCD_I2C == 1) /* I2C Expander PCF8574/MCP23008 */
@@ -3209,7 +3209,7 @@
* @param type Sets the panel size/addressing mode (default = LCD16x2)
* @param ctrl LCD controller (default = HD44780)
*/
-TextLCD_I2C::TextLCD_I2C(I2C *i2c, char deviceAddress, LCDType type, LCDCtrl ctrl) :
+TextLCD_I2C::TextLCD_I2C(DevI2C *i2c, char deviceAddress, LCDType type, LCDCtrl ctrl) :
TextLCD_Base(type, ctrl),
_i2c(i2c){
--- a/TextLCD.h Fri Dec 07 05:27:20 2018 +0000
+++ b/TextLCD.h Fri Jul 10 08:51:43 2020 +0000
@@ -50,6 +50,7 @@
#include "mbed.h"
#include "TextLCD_Config.h"
#include "TextLCD_UDC.h"
+#include "DevI2C.h"
/** A TextLCD interface for driving 4-bit HD44780-based LCDs
*
@@ -744,7 +745,7 @@
};
//----------- End TextLCD ---------------
-
+
//--------- Start TextLCD_I2C -----------
#if(LCD_I2C == 1) /* I2C Expander PCF8574/MCP23008 */
@@ -761,7 +762,7 @@
* @param type Sets the panel size/addressing mode (default = LCD16x2)
* @param ctrl LCD controller (default = HD44780)
*/
- TextLCD_I2C(I2C *i2c, char deviceAddress = PCF8574_SA0, LCDType type = LCD16x2, LCDCtrl ctrl = HD44780);
+ TextLCD_I2C(DevI2C *i2c, char deviceAddress = PCF8574_SA0, LCDType type = LCD16x2, LCDCtrl ctrl = HD44780);
private:
@@ -815,7 +816,7 @@
void _writeRegister (int reg, int value);
//I2C bus
- I2C *_i2c;
+ DevI2C *_i2c;
char _slaveAddress;
// Internal bus shadow value for serial bus only
--- a/TextLCD_Config.h Fri Dec 07 05:27:20 2018 +0000 +++ b/TextLCD_Config.h Fri Jul 10 08:51:43 2020 +0000 @@ -34,14 +34,14 @@ //Select hardware interface options to reduce memory footprint (multiple options allowed) #define LCD_I2C 1 /* I2C Expander PCF8574/MCP23008 */ -#define LCD_SPI 1 /* SPI Expander SN74595 */ -#define LCD_I2C_N 1 /* Native I2C bus */ -#define LCD_SPI_N 1 /* Native SPI bus */ -#define LCD_SPI_N_3_8 1 /* Native SPI bus */ -#define LCD_SPI_N_3_9 1 /* Native SPI bus */ -#define LCD_SPI_N_3_10 1 /* Native SPI bus */ -#define LCD_SPI_N_3_16 1 /* Native SPI bus */ -#define LCD_SPI_N_3_24 1 /* Native SPI bus */ +#define LCD_SPI 0 /* SPI Expander SN74595 */ +#define LCD_I2C_N 0 /* Native I2C bus */ +#define LCD_SPI_N 0 /* Native SPI bus */ +#define LCD_SPI_N_3_8 0 /* Native SPI bus */ +#define LCD_SPI_N_3_9 0 /* Native SPI bus */ +#define LCD_SPI_N_3_10 0 /* Native SPI bus */ +#define LCD_SPI_N_3_16 0 /* Native SPI bus */ +#define LCD_SPI_N_3_24 0 /* Native SPI bus */ //Select options to reduce memory footprint (multiple options allowed) #define LCD_UDC 1 /* Enable predefined UDC example*/