From 47c6ff979fea8051c02fb38fe99c0021880a4ed8 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Mon, 10 Jun 2013 13:21:09 +0800 Subject: update MultiLCD library --- libraries/MultiLCD/ZtLib.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'libraries/MultiLCD/ZtLib.cpp') diff --git a/libraries/MultiLCD/ZtLib.cpp b/libraries/MultiLCD/ZtLib.cpp index f8b55df..ecda4c4 100644 --- a/libraries/MultiLCD/ZtLib.cpp +++ b/libraries/MultiLCD/ZtLib.cpp @@ -8,10 +8,8 @@ Version:V1.1 */ +#include extern "C" { - #include - #include - #include #include "../Wire/utility/twi.h" } @@ -522,7 +520,7 @@ int ZtLib::ScI2cMxSetLocation(uint8_t addr, uint8_t page,uint8_t column) * 3 .. data send, NACK received * 4 .. other twi error (lost bus arbitration, bus error, ..) */ -void ZtLib::ScI2cMxDisplayDot16x16(uint8_t addr, uint8_t page, uint8_t column, const char *str) +void ZtLib::ScI2cMxDisplayDot16x16(uint8_t addr, uint8_t page, uint8_t column, unsigned char *str) { uint8_t buff[17]; buff[0] = REG_DAT; @@ -539,6 +537,14 @@ void ZtLib::ScI2cMxDisplayDot16x16(uint8_t addr, uint8_t page, uint8_t column, c } twi_writeTo(addr, buff, 17, 1, 1); } + +void ZtLib::ScI2cMxDisplayDot(uint8_t addr, const PROGMEM uint8_t* buffer, uint8_t len) +{ + uint8_t buff[9] = {REG_DAT}; + memcpy_P(buff + 1, buffer, len); + twi_writeTo(addr, buff, 9, 1, 1); +} + /* * Function ScI2cMxDisplayArea * Desc Set ZT.SC-I2CMx Display Area -- cgit v1.2.3