Merge pull request #1892 from izilzty/master

DataGP1247AI datasheet
This commit is contained in:
olikraus 2022-07-10 07:56:18 +02:00 committed by GitHub
commit faa2de9854
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 672 additions and 0 deletions

View File

@ -21852,6 +21852,114 @@ class U8G2_GU800_128X64_F_8080 : public U8G2 {
u8x8_SetPin_8Bit_8080(getU8x8(), d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_1_4W_SW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_1_4W_HW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_1_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_1(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_1_2ND_4W_HW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_1_2ND_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_2_4W_SW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_2_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_2(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_2_4W_HW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_2_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_2(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_2_2ND_4W_HW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_2_2ND_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_F_4W_SW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_F_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_f(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_F_4W_HW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_F_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_f(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1287AI_256X50_F_2ND_4W_HW_SPI : public U8G2 {
public: U8G2_GP1287AI_256X50_F_2ND_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1287ai_256x50_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_1_4W_SW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_1_4W_HW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_1_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_1(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_1_2ND_4W_HW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_1_2ND_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_2_4W_SW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_2_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_2(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_2_4W_HW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_2_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_2(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_2_2ND_4W_HW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_2_2ND_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_F_4W_SW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_F_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_f(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_F_4W_HW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_F_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_f(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8G2_GP1247AI_253X63_F_2ND_4W_HW_SPI : public U8G2 {
public: U8G2_GP1247AI_253X63_F_2ND_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() {
u8g2_Setup_gp1247ai_253x63_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
/* Arduino constructor list end */

View File

@ -7557,6 +7557,42 @@ class U8X8_GU800_128X64_8080 : public U8X8 {
u8x8_SetPin_8Bit_8080(getU8x8(), d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset);
}
};
class U8X8_GP1287AI_256X50_4W_SW_SPI : public U8X8 {
public: U8X8_GP1287AI_256X50_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gp1287ai_256x50, u8x8_cad_empty, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8X8_GP1287AI_256X50_4W_HW_SPI : public U8X8 {
public: U8X8_GP1287AI_256X50_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gp1287ai_256x50, u8x8_cad_empty, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8X8_GP1287AI_256X50_2ND_4W_HW_SPI : public U8X8 {
public: U8X8_GP1287AI_256X50_2ND_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gp1287ai_256x50, u8x8_cad_empty, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8X8_GP1247AI_253X63_4W_SW_SPI : public U8X8 {
public: U8X8_GP1247AI_253X63_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gp1247ai_253x63, u8x8_cad_empty, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8X8_GP1247AI_253X63_4W_HW_SPI : public U8X8 {
public: U8X8_GP1247AI_253X63_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gp1247ai_253x63, u8x8_cad_empty, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8X8_GP1247AI_253X63_2ND_4W_HW_SPI : public U8X8 {
public: U8X8_GP1247AI_253X63_2ND_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gp1247ai_253x63, u8x8_cad_empty, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
// constructor list end

View File

@ -621,6 +621,9 @@ uint8_t *u8g2_m_4_1_f(uint8_t *page_cnt);
uint8_t *u8g2_m_1_1_1(uint8_t *page_cnt);
uint8_t *u8g2_m_1_1_2(uint8_t *page_cnt);
uint8_t *u8g2_m_1_1_f(uint8_t *page_cnt);
uint8_t *u8g2_m_32_7_1(uint8_t *page_cnt);
uint8_t *u8g2_m_32_7_2(uint8_t *page_cnt);
uint8_t *u8g2_m_32_7_f(uint8_t *page_cnt);
uint8_t *u8g2_m_48_30_1(uint8_t *page_cnt);
uint8_t *u8g2_m_48_30_2(uint8_t *page_cnt);
uint8_t *u8g2_m_48_30_f(uint8_t *page_cnt);
@ -1415,6 +1418,12 @@ void u8g2_Setup_s1d15721_240x64_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_
void u8g2_Setup_gu800_128x64_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gu800_128x64_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gu800_128x64_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gp1287ai_256x50_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gp1287ai_256x50_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gp1287ai_256x50_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gp1247ai_253x63_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gp1247ai_253x63_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_gp1247ai_253x63_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_a2printer_384x240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_a2printer_384x240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);
void u8g2_Setup_a2printer_384x240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb);

View File

@ -1686,6 +1686,39 @@ uint8_t *u8g2_m_1_1_f(uint8_t *page_cnt)
return buf;
#endif
}
uint8_t *u8g2_m_32_7_1(uint8_t *page_cnt)
{
#ifdef U8G2_USE_DYNAMIC_ALLOC
*page_cnt = 1;
return 0;
#else
static uint8_t buf[256];
*page_cnt = 1;
return buf;
#endif
}
uint8_t *u8g2_m_32_7_2(uint8_t *page_cnt)
{
#ifdef U8G2_USE_DYNAMIC_ALLOC
*page_cnt = 2;
return 0;
#else
static uint8_t buf[512];
*page_cnt = 2;
return buf;
#endif
}
uint8_t *u8g2_m_32_7_f(uint8_t *page_cnt)
{
#ifdef U8G2_USE_DYNAMIC_ALLOC
*page_cnt = 7;
return 0;
#else
static uint8_t buf[1792];
*page_cnt = 7;
return buf;
#endif
}
uint8_t *u8g2_m_48_30_1(uint8_t *page_cnt)
{
#ifdef U8G2_USE_DYNAMIC_ALLOC

View File

@ -7087,6 +7087,62 @@ void u8g2_Setup_gu800_128x64_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg
buf = u8g2_m_16_8_f(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
/* gp1287ai */
/* gp1287ai 1 */
void u8g2_Setup_gp1287ai_256x50_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gp1287ai_256x50, u8x8_cad_empty, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_32_7_1(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
/* gp1287ai 2 */
void u8g2_Setup_gp1287ai_256x50_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gp1287ai_256x50, u8x8_cad_empty, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_32_7_2(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
/* gp1287ai f */
void u8g2_Setup_gp1287ai_256x50_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gp1287ai_256x50, u8x8_cad_empty, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_32_7_f(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
/* gp1247ai */
/* gp1247ai 1 */
void u8g2_Setup_gp1247ai_253x63_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gp1247ai_253x63, u8x8_cad_empty, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_32_8_1(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
/* gp1247ai 2 */
void u8g2_Setup_gp1247ai_253x63_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gp1247ai_253x63, u8x8_cad_empty, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_32_8_2(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
/* gp1247ai f */
void u8g2_Setup_gp1247ai_253x63_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gp1247ai_253x63, u8x8_cad_empty, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_32_8_f(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
/* a2printer */
/* a2printer 1 */
void u8g2_Setup_a2printer_384x240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)

View File

@ -996,6 +996,8 @@ uint8_t u8x8_d_max7219_8x8(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg
uint8_t u8x8_d_s1d15e06_160100(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_d_s1d15721_240x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_d_gu800_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_d_gp1287ai_256x50(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_d_gp1247ai_253x63(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);

201
csrc/u8x8_d_gp1247ai.c Normal file
View File

@ -0,0 +1,201 @@
/*
u8x8_d_gp1247ai.c
Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
Copyright (c) 2016, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "u8x8.h"
#define SWAP8(a) ((((a)&0x80) >> 7) | (((a)&0x40) >> 5) | (((a)&0x20) >> 3) | (((a)&0x10) >> 1) | (((a)&0x08) << 1) | (((a)&0x04) << 3) | (((a)&0x02) << 5) | (((a)&0x01) << 7))
/* ========== GP1247AI ========== */
static const u8x8_display_info_t u8x8_gp1247ai_display_info = {
/* chip_enable_level = */ 0,
/* chip_disable_level = */ 1,
/* post_chip_enable_wait_ns = */ 240, /* tCS-CLK */
/* pre_chip_disable_wait_ns = */ 120, /* tCLK-CS */
/* reset_pulse_width_ms = */ 1, /* Trw */
/* post_reset_wait_ms = */ 1, /* Trth */
/* sda_setup_time_ns = */ 60, /* tsu */
/* sck_pulse_width_ns = */ 120, /* tcyc/2 */
/* sck_clock_hz = */ 4000000UL, /* MAX 4.16 MHz */
/* spi_mode = */ 3, /* active low, falling edge, MSBFIRST */
/* i2c_bus_clock_100kHz = */ 4, /* */
/* data_setup_time_ns = */ 60, /* tsu */
/* write_pulse_width_ns = */ 120, /* tcyc/2 */
/* tile_width = */ 32, /* 32*8=256 memory size */
/* tile_hight = */ 8, /* 8*8=64 memory size */
/* default_x_offset = */ 0, /* */
/* flipmode_x_offset = */ 0, /* */
/* pixel_width = */ 253, /* display size */
/* pixel_height = */ 63 /* display size */
};
static const uint8_t u8x8_d_gp1247ai_init_seq[] = {
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x0AA)), /* Software reset */
U8X8_END_TRANSFER(),
U8X8_DLY(1), /* Wait for reset */
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x078), SWAP8(0x008)), /* Oscillation Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0CC), SWAP8(0x005), SWAP8(0x000)), /* VFD Mode Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAAA(SWAP8(0x0E0), SWAP8(0x0FC), SWAP8(0x03E), SWAP8(0x000)), /* Display Area Setting */
U8X8_A4(SWAP8(0x020), SWAP8(0x080), SWAP8(0x080), SWAP8(0x080)), /* Display Area Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAAAA(SWAP8(0x0B1), SWAP8(0x020), SWAP8(0x03F), SWAP8(0x000), SWAP8(0x001)), /* Internal Speed Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0A0), SWAP8(0x000), SWAP8(0x028)), /* Dimming level Setting (1024 level, 0x3FF max) */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x055)), /* Memory Map Clear */
U8X8_END_TRANSFER(),
U8X8_DLY(15), /* Wait for memory clear */
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0C0), SWAP8(0x000), SWAP8(0x000)), /* DW1 position setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0D0), SWAP8(0x000), SWAP8(0x040)), /* DW2 position setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x080), SWAP8(0x080)), /* Display Mode Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x061)), /* Standby Mode */
U8X8_END_TRANSFER(),
U8X8_END() /* end of sequence */
};
static const uint8_t u8x8_d_gp1247ai_standby_seq[] = {
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x061)), /* Standby */
U8X8_END_TRANSFER(),
U8X8_END() /* end of sequence */
};
static const uint8_t u8x8_d_gp1247ai_wakeup_seq[] = {
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x06D)), /* Wake up */
U8X8_END_TRANSFER(),
U8X8_DLY(1), /* Wait for OSC stabilize */
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x080), SWAP8(0x080)), /* After entering standby mode, the SC bit will be automatically cleared */
U8X8_END_TRANSFER(),
U8X8_END() /* end of sequence */
};
uint8_t u8x8_d_gp1247ai_common(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
uint8_t *ptr;
uint8_t x, y;
uint16_t tx_cnt;
uint8_t swapped_byte;
switch (msg)
{
case U8X8_MSG_DISPLAY_SET_POWER_SAVE:
if (arg_int == 0)
u8x8_cad_SendSequence(u8x8, u8x8_d_gp1247ai_wakeup_seq);
else
u8x8_cad_SendSequence(u8x8, u8x8_d_gp1247ai_standby_seq);
break;
#ifdef U8X8_WITH_SET_CONTRAST
case U8X8_MSG_DISPLAY_SET_CONTRAST:
u8x8_cad_StartTransfer(u8x8);
u8x8_cad_SendCmd(u8x8, SWAP8(0x0A0));
u8x8_cad_SendArg(u8x8, SWAP8((arg_int * 4) >> 8)); /* Dimming level */
u8x8_cad_SendArg(u8x8, SWAP8((arg_int * 4) & 0xFF)); /* Dimming level */
u8x8_cad_EndTransfer(u8x8);
break;
#endif
case U8X8_MSG_DISPLAY_DRAW_TILE:
x = ((u8x8_tile_t *)arg_ptr)->x_pos * 8;
y = ((u8x8_tile_t *)arg_ptr)->y_pos * 8;
u8x8_cad_StartTransfer(u8x8);
u8x8_cad_SendCmd(u8x8, SWAP8(0x0F0));
u8x8_cad_SendArg(u8x8, SWAP8(x));
u8x8_cad_SendArg(u8x8, SWAP8(y));
u8x8_cad_SendArg(u8x8, SWAP8(0x007)); /* return every 8 pixels */
do
{
ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr;
tx_cnt = ((u8x8_tile_t *)arg_ptr)->cnt * 8;
while (tx_cnt > 0)
{
swapped_byte = SWAP8(*ptr);
u8x8_cad_SendData(u8x8, 1, &swapped_byte);
ptr += 1;
tx_cnt -= 1;
}
arg_int--;
} while (arg_int > 0);
u8x8_cad_EndTransfer(u8x8);
break;
default:
return 0;
}
return 1;
}
uint8_t u8x8_d_gp1247ai_253x63(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
switch (msg)
{
case U8X8_MSG_DISPLAY_SETUP_MEMORY:
u8x8_d_helper_display_setup_memory(u8x8, &u8x8_gp1247ai_display_info);
break;
case U8X8_MSG_DISPLAY_INIT:
u8x8_d_helper_display_init(u8x8);
u8x8_cad_SendSequence(u8x8, u8x8_d_gp1247ai_init_seq);
break;
default:
return u8x8_d_gp1247ai_common(u8x8, msg, arg_int, arg_ptr);
}
return 1;
}

209
csrc/u8x8_d_gp1287ai.c Normal file
View File

@ -0,0 +1,209 @@
/*
u8x8_d_gp1287ai.c
Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
Copyright (c) 2016, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "u8x8.h"
#define SWAP8(a) ((((a)&0x80) >> 7) | (((a)&0x40) >> 5) | (((a)&0x20) >> 3) | (((a)&0x10) >> 1) | (((a)&0x08) << 1) | (((a)&0x04) << 3) | (((a)&0x02) << 5) | (((a)&0x01) << 7))
/* ========== GP1287AI ========== */
static const u8x8_display_info_t u8x8_gp1287ai_display_info = {
/* chip_enable_level = */ 0,
/* chip_disable_level = */ 1,
/* post_chip_enable_wait_ns = */ 240, /* tCS-CLK */
/* pre_chip_disable_wait_ns = */ 120, /* tCLK-CS */
/* reset_pulse_width_ms = */ 1, /* Trw */
/* post_reset_wait_ms = */ 1, /* Trth */
/* sda_setup_time_ns = */ 60, /* tsu */
/* sck_pulse_width_ns = */ 120, /* tcyc/2 */
/* sck_clock_hz = */ 4000000UL, /* MAX 4.16 MHz */
/* spi_mode = */ 3, /* active low, falling edge, MSBFIRST */
/* i2c_bus_clock_100kHz = */ 4, /* */
/* data_setup_time_ns = */ 60, /* tsu */
/* write_pulse_width_ns = */ 120, /* tcyc/2 */
/* tile_width = */ 32, /* 32*8=256 memory size */
/* tile_hight = */ 7, /* 7*8=56 memory size */
/* default_x_offset = */ 0, /* */
/* flipmode_x_offset = */ 0, /* */
/* pixel_width = */ 256, /* display size */
/* pixel_height = */ 50 /* display size */
};
static const uint8_t u8x8_d_gp1287ai_init_seq[] = {
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x0AA)), /* Software reset */
U8X8_END_TRANSFER(),
U8X8_DLY(1), /* Wait for reset */
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x078), SWAP8(0x008)), /* Oscillation Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0CC), SWAP8(0x002), SWAP8(0x000)), /* VFD Mode Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAAA(SWAP8(0x0E0), SWAP8(0x0FF), SWAP8(0x031), SWAP8(0x000)), /* Display Area Setting */
U8X8_A4(SWAP8(0x020), SWAP8(0x000), SWAP8(0x000), SWAP8(0x080)), /* Display Area Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAAAA(SWAP8(0x0B1), SWAP8(0x020), SWAP8(0x03F), SWAP8(0x000), SWAP8(0x001)), /* Internal Speed Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0A0), SWAP8(0x000), SWAP8(0x028)), /* Dimming level Setting (1024 level, 0x3FF max) */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x055)), /* Memory Map Clear */
U8X8_END_TRANSFER(),
U8X8_DLY(15), /* Waiting for memory clear */
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0C0), SWAP8(0x000), SWAP8(0x004)), /* DW1 position setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CAA(SWAP8(0x0D0), SWAP8(0x000), SWAP8(0x03C)), /* DW2 position setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x090), SWAP8(0x000)), /* Internal Command */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x008), SWAP8(0x000)), /* T1 INT Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x080), SWAP8(0x000)), /* Display Mode Setting */
U8X8_END_TRANSFER(),
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x061)), /* Standby Mode */
U8X8_END_TRANSFER(),
U8X8_END() /* end of sequence */
};
static const uint8_t u8x8_d_gp1287ai_standby_seq[] = {
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x061)), /* Standby */
U8X8_END_TRANSFER(),
U8X8_END() /* end of sequence */
};
static const uint8_t u8x8_d_gp1287ai_wakeup_seq[] = {
U8X8_START_TRANSFER(),
U8X8_C(SWAP8(0x06D)), /* Wake up */
U8X8_END_TRANSFER(),
U8X8_DLY(1), /* Wait for OSC stabilize */
U8X8_START_TRANSFER(),
U8X8_CA(SWAP8(0x080), SWAP8(0x000)), /* After entering standby mode, the SC bit will be automatically cleared */
U8X8_END_TRANSFER(),
U8X8_END() /* end of sequence */
};
uint8_t u8x8_d_gp1287ai_common(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
uint8_t *ptr;
uint8_t x, y;
uint16_t tx_cnt;
uint8_t swapped_byte;
switch (msg)
{
case U8X8_MSG_DISPLAY_SET_POWER_SAVE:
if (arg_int == 0)
u8x8_cad_SendSequence(u8x8, u8x8_d_gp1287ai_wakeup_seq);
else
u8x8_cad_SendSequence(u8x8, u8x8_d_gp1287ai_standby_seq);
break;
#ifdef U8X8_WITH_SET_CONTRAST
case U8X8_MSG_DISPLAY_SET_CONTRAST:
u8x8_cad_StartTransfer(u8x8);
u8x8_cad_SendCmd(u8x8, SWAP8(0x0A0));
u8x8_cad_SendArg(u8x8, SWAP8((arg_int * 4) >> 8)); /* Dimming level */
u8x8_cad_SendArg(u8x8, SWAP8((arg_int * 4) & 0xFF)); /* Dimming level */
u8x8_cad_EndTransfer(u8x8);
break;
#endif
case U8X8_MSG_DISPLAY_DRAW_TILE:
x = ((u8x8_tile_t *)arg_ptr)->x_pos * 8;
y = ((u8x8_tile_t *)arg_ptr)->y_pos * 8 + 4;
u8x8_cad_StartTransfer(u8x8);
u8x8_cad_SendCmd(u8x8, SWAP8(0x0F0));
u8x8_cad_SendArg(u8x8, SWAP8(x));
u8x8_cad_SendArg(u8x8, SWAP8(y));
u8x8_cad_SendArg(u8x8, SWAP8(0x007)); /* return every 8 pixels */
do
{
ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr;
tx_cnt = ((u8x8_tile_t *)arg_ptr)->cnt * 8;
while (tx_cnt > 0)
{
swapped_byte = SWAP8(*ptr);
u8x8_cad_SendData(u8x8, 1, &swapped_byte);
ptr += 1;
tx_cnt -= 1;
}
arg_int--;
} while (arg_int > 0);
u8x8_cad_EndTransfer(u8x8);
break;
default:
return 0;
}
return 1;
}
uint8_t u8x8_d_gp1287ai_256x50(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
switch (msg)
{
case U8X8_MSG_DISPLAY_SETUP_MEMORY:
u8x8_d_helper_display_setup_memory(u8x8, &u8x8_gp1287ai_display_info);
break;
case U8X8_MSG_DISPLAY_INIT:
u8x8_d_helper_display_init(u8x8);
u8x8_cad_SendSequence(u8x8, u8x8_d_gp1287ai_init_seq);
break;
default:
return u8x8_d_gp1287ai_common(u8x8, msg, arg_int, arg_ptr);
}
return 1;
}

View File

@ -1877,6 +1877,24 @@ struct controller controller_list[] =
{ NULL }
}
},
{
"gp1287ai", 32, 7, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
"", /* is_generate_u8g2_class= */ 1,
{
{ "256x50" },
{ NULL }
}
},
{
"gp1247ai", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
"", /* is_generate_u8g2_class= */ 1,
{
{ "253x63" },
{ NULL }
}
},
{
"a2printer", 48, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_UART,