Removed SET_I2C and SET_DEVICE messages

This commit is contained in:
olikraus 2016-05-01 10:01:37 +02:00
parent b3db1c57cf
commit 3b20aed15d
9 changed files with 36 additions and 60 deletions

View File

@ -2,4 +2,6 @@
https://github.com/olikraus/u8g2 ChangeLog https://github.com/olikraus/u8g2 ChangeLog
2016-01-01 v2.00 olikraus@gmail.com 2016-04-30 v2.0.1 olikraus@gmail.com
* Support for DOGS102, ST7920, SSD1306
* Most graphics primitives are implemented

View File

@ -151,10 +151,6 @@ extern "C" uint8_t u8x8_byte_arduino_hw_spi(u8x8_t *u8g2, uint8_t msg, uint8_t a
SPI.end(); SPI.end();
break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break; break;
default: default:
return 0; return 0;
@ -178,7 +174,7 @@ void u8x8_SetPin_4Wire_SW_SPI(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#ifdef _obsolete_com_specific_setup
void u8x8_Setup_4Wire_SW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset) void u8x8_Setup_4Wire_SW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset)
{ {
u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_4wire_sw_spi, u8x8_gpio_and_delay_arduino); u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
@ -190,6 +186,7 @@ void u8x8_Setup_4Wire_SW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock
u8x8_SetPin(u8x8, U8X8_PIN_DC, dc); u8x8_SetPin(u8x8, U8X8_PIN_DC, dc);
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#endif /* obsolete com specific setup */
void u8x8_SetPin_3Wire_SW_SPI(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset) void u8x8_SetPin_3Wire_SW_SPI(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset)
{ {
@ -199,6 +196,7 @@ void u8x8_SetPin_3Wire_SW_SPI(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#ifdef _obsolete_com_specific_setup
void u8x8_Setup_3Wire_SW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset) void u8x8_Setup_3Wire_SW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset)
{ {
u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino);
@ -209,6 +207,7 @@ void u8x8_Setup_3Wire_SW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock
u8x8_SetPin(u8x8, U8X8_PIN_CS, cs); u8x8_SetPin(u8x8, U8X8_PIN_CS, cs);
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#endif /* obsolete com specific setup */
/* /*
use U8X8_PIN_NONE as value for "reset", if there is no reset line use U8X8_PIN_NONE as value for "reset", if there is no reset line
@ -221,6 +220,7 @@ void u8x8_SetPin_4Wire_HW_SPI(u8x8_t *u8x8, uint8_t cs, uint8_t dc, uint8_t rese
} }
#ifdef _obsolete_com_specific_setup
void u8x8_Setup_4Wire_HW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t cs, uint8_t dc, uint8_t reset) void u8x8_Setup_4Wire_HW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t cs, uint8_t dc, uint8_t reset)
{ {
u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
@ -230,15 +230,17 @@ void u8x8_Setup_4Wire_HW_SPI(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t cs, u
u8x8_SetPin(u8x8, U8X8_PIN_DC, dc); u8x8_SetPin(u8x8, U8X8_PIN_DC, dc);
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#endif /* obsolete com specific setup */
void u8x8_SetPin_SSD13xx_SW_I2C(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t reset) void u8x8_SetPin_SSD13xx_SW_I2C(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t reset)
{ {
u8x8_SetPin(u8x8, U8X8_PIN_I2C_CLOCK, clock); u8x8_SetPin(u8x8, U8X8_PIN_I2C_CLOCK, clock);
u8x8_SetPin(u8x8, U8X8_PIN_I2C_DATA, data); u8x8_SetPin(u8x8, U8X8_PIN_I2C_DATA, data);
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#ifdef _obsolete_com_specific_setup
void u8x8_Setup_SSD13xx_SW_I2C(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock, uint8_t data, uint8_t reset) void u8x8_Setup_SSD13xx_SW_I2C(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clock, uint8_t data, uint8_t reset)
{ {
u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_ssd13xx_sw_i2c, u8x8_gpio_and_delay_arduino); u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_ssd13xx_sw_i2c, u8x8_gpio_and_delay_arduino);
@ -247,8 +249,8 @@ void u8x8_Setup_SSD13xx_SW_I2C(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t clo
u8x8_SetPin(u8x8, U8X8_PIN_I2C_CLOCK, clock); u8x8_SetPin(u8x8, U8X8_PIN_I2C_CLOCK, clock);
u8x8_SetPin(u8x8, U8X8_PIN_I2C_DATA, data); u8x8_SetPin(u8x8, U8X8_PIN_I2C_DATA, data);
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#endif /* obsolete com specific setup */
void u8x8_SetPin_8Bit_6800(u8x8_t *u8x8, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset) void u8x8_SetPin_8Bit_6800(u8x8_t *u8x8, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset)
{ {
@ -266,6 +268,7 @@ void u8x8_SetPin_8Bit_6800(u8x8_t *u8x8, uint8_t d0, uint8_t d1, uint8_t d2, uin
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#ifdef _obsolete_com_specific_setup
void u8x8_Setup_8Bit_6800(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset) void u8x8_Setup_8Bit_6800(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset)
{ {
u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_8bit_6800mode, u8x8_gpio_and_delay_arduino); u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_8bit_6800mode, u8x8_gpio_and_delay_arduino);
@ -284,6 +287,8 @@ void u8x8_Setup_8Bit_6800(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint
u8x8_SetPin(u8x8, U8X8_PIN_DC, dc); u8x8_SetPin(u8x8, U8X8_PIN_DC, dc);
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#endif /* obsolete com specific setup */
void u8x8_SetPin_8Bit_8080(u8x8_t *u8x8, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t wr, uint8_t cs, uint8_t dc, uint8_t reset) void u8x8_SetPin_8Bit_8080(u8x8_t *u8x8, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t wr, uint8_t cs, uint8_t dc, uint8_t reset)
{ {
@ -301,6 +306,8 @@ void u8x8_SetPin_8Bit_8080(u8x8_t *u8x8, uint8_t d0, uint8_t d1, uint8_t d2, uin
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#ifdef _obsolete_com_specific_setup
void u8x8_Setup_8Bit_8080(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t wr, uint8_t cs, uint8_t dc, uint8_t reset) void u8x8_Setup_8Bit_8080(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t wr, uint8_t cs, uint8_t dc, uint8_t reset)
{ {
u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_8bit_8080mode, u8x8_gpio_and_delay_arduino); u8x8_Setup(u8x8, display_cb, u8x8_cad_001, u8x8_byte_8bit_8080mode, u8x8_gpio_and_delay_arduino);
@ -319,3 +326,5 @@ void u8x8_Setup_8Bit_8080(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint
u8x8_SetPin(u8x8, U8X8_PIN_DC, dc); u8x8_SetPin(u8x8, U8X8_PIN_DC, dc);
u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset); u8x8_SetPin(u8x8, U8X8_PIN_RESET, reset);
} }
#endif /* obsolete com specific setup */

View File

@ -306,6 +306,7 @@ struct u8g2_struct
uint8_t draw_color; /* 0: clear pixel, 1: set pixel, modified and restored by font procedures */ uint8_t draw_color; /* 0: clear pixel, 1: set pixel, modified and restored by font procedures */
/* draw_color can be used also directly by the user API */ /* draw_color can be used also directly by the user API */
#ifdef U8G2_WITH_HVLINE_COUNT #ifdef U8G2_WITH_HVLINE_COUNT
unsigned long hv_cnt; unsigned long hv_cnt;
@ -330,6 +331,9 @@ struct u8g2_struct
#define u8g2_GetDisplayWidth(u8g2) ((u8g2)->width) #define u8g2_GetDisplayWidth(u8g2) ((u8g2)->width)
#define u8g2_GetDrawColor(u8g2) ((u8g2)->draw_color) #define u8g2_GetDrawColor(u8g2) ((u8g2)->draw_color)
#define u8g2_SetI2CAddress(u8g2, address) ((u8g2_GetU8x8(u8g2))->i2c_address = (address))
#define u8g2_GetI2CAddress(u8g2) u8x8_GetI2CAddress(u8g2_GetU8x8(u8g2))
/*==========================================*/ /*==========================================*/
/* u8g2_setup.c */ /* u8g2_setup.c */

View File

@ -53,8 +53,8 @@
to communicate with the display hardware. to communicate with the display hardware.
This layer only deals with data, commands and arguments. D/C line is unknown. This layer only deals with data, commands and arguments. D/C line is unknown.
U8X8_MSG_CAD_INIT U8X8_MSG_CAD_INIT
U8X8_MSG_CAD_SET_I2C_ADR U8X8_MSG_CAD_SET_I2C_ADR (obsolete)
U8X8_MSG_CAD_SET_DEVICE U8X8_MSG_CAD_SET_DEVICE (obsolete)
U8X8_MSG_CAD_START_TRANSFER U8X8_MSG_CAD_START_TRANSFER
U8X8_MSG_CAD_SEND_CMD U8X8_MSG_CAD_SEND_CMD
U8X8_MSG_CAD_SEND_ARG U8X8_MSG_CAD_SEND_ARG
@ -71,8 +71,8 @@
U8X8_MSG_BYTE_SET_DC 31 U8X8_MSG_BYTE_SET_DC 31
U8X8_MSG_BYTE_START_TRANSFER U8X8_MSG_BYTE_START_TRANSFER
U8X8_MSG_BYTE_END_TRANSFER U8X8_MSG_BYTE_END_TRANSFER
U8X8_MSG_BYTE_SET_I2C_ADR U8X8_MSG_BYTE_SET_I2C_ADR (obsolete)
U8X8_MSG_BYTE_SET_DEVICE U8X8_MSG_BYTE_SET_DEVICE (obsolete)
GPIO and Delay GPIO and Delay
U8X8_MSG_GPIO_INIT U8X8_MSG_GPIO_INIT
@ -249,7 +249,10 @@ struct u8x8_struct
uint8_t x_offset; /* copied from info struct, can be modified in flip mode */ uint8_t x_offset; /* copied from info struct, can be modified in flip mode */
uint8_t is_font_inverse_mode; /* 0: normal, 1: font glyphs are inverted */ uint8_t is_font_inverse_mode; /* 0: normal, 1: font glyphs are inverted */
uint8_t i2c_address; /* a valid i2c adr. Initially this is 255, but this is set to something usefull during DISPLAY_INIT */ uint8_t i2c_address; /* a valid i2c adr. Initially this is 255, but this is set to something usefull during DISPLAY_INIT */
/* i2c_address is the address for writing data to the display */
/* usually, the lowest bit must be zero for a valid address */
uint8_t i2c_started; /* for i2c interface */ uint8_t i2c_started; /* for i2c interface */
uint8_t device_address; /* this is the device address, replacement for U8X8_MSG_CAD_SET_DEVICE */
#ifdef U8X8_USE_PINS #ifdef U8X8_USE_PINS
uint8_t pins[U8X8_PIN_CNT]; /* defines a pinlist: Mainly a list of pins for the Arduino Envionment, use U8X8_PIN_xxx to access */ uint8_t pins[U8X8_PIN_CNT]; /* defines a pinlist: Mainly a list of pins for the Arduino Envionment, use U8X8_PIN_xxx to access */
#endif #endif
@ -437,8 +440,8 @@ void u8x8_ClearDisplay(u8x8_t *u8x8);
/* arg_int: expected cs level after processing this msg */ /* arg_int: expected cs level after processing this msg */
#define U8X8_MSG_CAD_END_TRANSFER 25 #define U8X8_MSG_CAD_END_TRANSFER 25
/* arg_int = 0: disable chip, arg_int = 1: enable chip */ /* arg_int = 0: disable chip, arg_int = 1: enable chip */
#define U8X8_MSG_CAD_SET_I2C_ADR 26 //#define U8X8_MSG_CAD_SET_I2C_ADR 26
#define U8X8_MSG_CAD_SET_DEVICE 27 //#define U8X8_MSG_CAD_SET_DEVICE 27
@ -489,8 +492,8 @@ uint8_t u8x8_cad_ssd13xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a
#define U8X8_MSG_BYTE_START_TRANSFER U8X8_MSG_CAD_START_TRANSFER #define U8X8_MSG_BYTE_START_TRANSFER U8X8_MSG_CAD_START_TRANSFER
#define U8X8_MSG_BYTE_END_TRANSFER U8X8_MSG_CAD_END_TRANSFER #define U8X8_MSG_BYTE_END_TRANSFER U8X8_MSG_CAD_END_TRANSFER
#define U8X8_MSG_BYTE_SET_I2C_ADR U8X8_MSG_CAD_SET_I2C_ADR //#define U8X8_MSG_BYTE_SET_I2C_ADR U8X8_MSG_CAD_SET_I2C_ADR
#define U8X8_MSG_BYTE_SET_DEVICE U8X8_MSG_CAD_SET_DEVICE //#define U8X8_MSG_BYTE_SET_DEVICE U8X8_MSG_CAD_SET_DEVICE
uint8_t u8x8_byte_SetDC(u8x8_t *u8x8, uint8_t dc) U8X8_NOINLINE; uint8_t u8x8_byte_SetDC(u8x8_t *u8x8, uint8_t dc) U8X8_NOINLINE;

View File

@ -83,8 +83,6 @@ uint8_t u8x8_byte_EndTransfer(u8x8_t *u8x8)
U8X8_MSG_BYTE_SET_DC U8X8_MSG_BYTE_SET_DC
U8X8_MSG_BYTE_START_TRANSFER U8X8_MSG_BYTE_START_TRANSFER
U8X8_MSG_BYTE_END_TRANSFER U8X8_MSG_BYTE_END_TRANSFER
U8X8_MSG_BYTE_SET_I2C_ADR (ignored)
U8X8_MSG_BYTE_SET_DEVICE (ignored)
*/ */
uint8_t u8x8_byte_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) uint8_t u8x8_byte_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
@ -138,10 +136,6 @@ uint8_t u8x8_byte_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void
u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL); u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL);
u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level); u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level);
break; break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break;
default: default:
return 0; return 0;
} }
@ -194,10 +188,6 @@ uint8_t u8x8_byte_8bit_6800mode(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void
u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL); u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL);
u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level); u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level);
break; break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break;
default: default:
return 0; return 0;
} }
@ -248,10 +238,6 @@ uint8_t u8x8_byte_8bit_8080mode(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void
u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL); u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL);
u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level); u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level);
break; break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break;
default: default:
return 0; return 0;
} }
@ -315,10 +301,6 @@ uint8_t u8x8_byte_3wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void
u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL); u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL);
u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level); u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level);
break; break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break;
default: default:
return 0; return 0;
} }
@ -407,10 +389,6 @@ uint8_t u8x8_byte_st7920_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void
u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL); u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, u8x8->display_info->pre_chip_disable_wait_ns, NULL);
u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level); u8x8_gpio_SetCS(u8x8, u8x8->display_info->chip_disable_level);
break; break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break;
default: default:
return 0; return 0;
} }
@ -596,10 +574,6 @@ uint8_t u8x8_byte_ssd13xx_sw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, voi
case U8X8_MSG_BYTE_END_TRANSFER: case U8X8_MSG_BYTE_END_TRANSFER:
i2c_stop(u8x8); i2c_stop(u8x8);
break; break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break;
default: default:
return 0; return 0;
} }
@ -637,10 +611,6 @@ uint8_t u8x8_byte_sw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_p
case U8X8_MSG_BYTE_END_TRANSFER: case U8X8_MSG_BYTE_END_TRANSFER:
i2c_stop(u8x8); i2c_stop(u8x8);
break; break;
case U8X8_MSG_BYTE_SET_I2C_ADR:
break;
case U8X8_MSG_BYTE_SET_DEVICE:
break;
default: default:
return 0; return 0;
} }

View File

@ -75,10 +75,6 @@ uint8_t u8x8_cad_template(u8x8_t *u8x8, uint8_t msg, uint16_t arg_int, void *arg
return mcd->next->cb(mcd->next, msg, arg_int, arg_ptr); return mcd->next->cb(mcd->next, msg, arg_int, arg_ptr);
case U8X8_MSG_CAD_END_TRANSFER: case U8X8_MSG_CAD_END_TRANSFER:
return mcd->next->cb(mcd->next, msg, arg_int, arg_ptr); return mcd->next->cb(mcd->next, msg, arg_int, arg_ptr);
case U8X8_MSG_CAD_SET_I2C_ADR:
return mcd->next->cb(mcd->next, msg, arg_int, arg_ptr);
case U8X8_MSG_CAD_SET_DEVICE:
return mcd->next->cb(mcd->next, msg, arg_int, arg_ptr);
default: default:
break; break;
} }
@ -187,8 +183,6 @@ uint8_t u8x8_cad_110(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
case U8X8_MSG_CAD_INIT: case U8X8_MSG_CAD_INIT:
case U8X8_MSG_CAD_START_TRANSFER: case U8X8_MSG_CAD_START_TRANSFER:
case U8X8_MSG_CAD_END_TRANSFER: case U8X8_MSG_CAD_END_TRANSFER:
case U8X8_MSG_CAD_SET_I2C_ADR:
case U8X8_MSG_CAD_SET_DEVICE:
return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr); return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr);
default: default:
return 0; return 0;
@ -221,8 +215,6 @@ uint8_t u8x8_cad_001(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
case U8X8_MSG_CAD_INIT: case U8X8_MSG_CAD_INIT:
case U8X8_MSG_CAD_START_TRANSFER: case U8X8_MSG_CAD_START_TRANSFER:
case U8X8_MSG_CAD_END_TRANSFER: case U8X8_MSG_CAD_END_TRANSFER:
case U8X8_MSG_CAD_SET_I2C_ADR:
case U8X8_MSG_CAD_SET_DEVICE:
return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr); return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr);
default: default:
return 0; return 0;
@ -271,8 +263,6 @@ uint8_t u8x8_cad_st7920_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *ar
case U8X8_MSG_CAD_INIT: case U8X8_MSG_CAD_INIT:
case U8X8_MSG_CAD_START_TRANSFER: case U8X8_MSG_CAD_START_TRANSFER:
case U8X8_MSG_CAD_END_TRANSFER: case U8X8_MSG_CAD_END_TRANSFER:
case U8X8_MSG_CAD_SET_I2C_ADR:
case U8X8_MSG_CAD_SET_DEVICE:
return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr); return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr);
default: default:
return 0; return 0;
@ -310,9 +300,6 @@ uint8_t u8x8_cad_ssd13xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a
/* apply default i2c adr if required so that the start transfer msg can use this */ /* apply default i2c adr if required so that the start transfer msg can use this */
if ( u8x8->i2c_address == 255 ) if ( u8x8->i2c_address == 255 )
u8x8->i2c_address = 0x078; u8x8->i2c_address = 0x078;
/* fall through */
case U8X8_MSG_CAD_SET_I2C_ADR:
case U8X8_MSG_CAD_SET_DEVICE:
return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr); return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr);
case U8X8_MSG_CAD_START_TRANSFER: case U8X8_MSG_CAD_START_TRANSFER:
case U8X8_MSG_CAD_END_TRANSFER: case U8X8_MSG_CAD_END_TRANSFER:

View File

@ -58,6 +58,7 @@ void u8x8_SetupDefaults(u8x8_t *u8x8)
u8x8->gpio_and_delay_cb = u8x8_dummy_cb; u8x8->gpio_and_delay_cb = u8x8_dummy_cb;
u8x8->is_font_inverse_mode = 0; u8x8->is_font_inverse_mode = 0;
u8x8->i2c_address = 255; u8x8->i2c_address = 255;
u8x8->device_address = 0;
#ifdef U8X8_USE_PINS #ifdef U8X8_USE_PINS
{ {

0
tools/buildcpp/OBSOLETE Normal file
View File

View File

@ -1,2 +1,2 @@
# without 'v' prefix # without 'v' prefix
echo -n "2.0.0" echo -n "2.0.1"