mirror of
https://github.com/tsl0922/EPD-nRF5.git
synced 2026-05-21 05:35:46 +08:00
add SSD1619 bw model
This commit is contained in:
@@ -299,12 +299,14 @@ void EPD_LED_TOGGLE(void)
|
||||
extern epd_model_t epd_uc8176_420_bw;
|
||||
extern epd_model_t epd_uc8176_420_bwr;
|
||||
extern epd_model_t epd_ssd1619_420_bwr;
|
||||
extern epd_model_t epd_ssd1619_420_bw;
|
||||
extern epd_model_t epd_uc8276_420_bwr;
|
||||
|
||||
static epd_model_t *epd_models[] = {
|
||||
&epd_uc8176_420_bw,
|
||||
&epd_uc8176_420_bwr,
|
||||
&epd_ssd1619_420_bwr,
|
||||
&epd_ssd1619_420_bw,
|
||||
&epd_uc8276_420_bwr,
|
||||
};
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ typedef enum
|
||||
EPD_UC8176_420_BW = 1,
|
||||
EPD_UC8176_420_BWR = 3,
|
||||
EPD_SSD1619_420_BWR = 2,
|
||||
EPD_SSD1619_420_BW = 4,
|
||||
EPD_UC8276_420_BWR = 5,
|
||||
} epd_model_id_t;
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ void SSD1619_Clear(void)
|
||||
EPD_WriteCommand(CMD_WRITE_RAM2);
|
||||
for (uint16_t j = 0; j < Height; j++) {
|
||||
for (uint16_t i = 0; i < Width; i++) {
|
||||
EPD_WriteByte(0x00);
|
||||
EPD_WriteByte(EPD_BWR_MODE ? 0x00 : 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,10 @@ void SSD1619_Write_Image(uint8_t *black, uint8_t *color, uint16_t x, uint16_t y,
|
||||
EPD_WriteCommand(CMD_WRITE_RAM2);
|
||||
for (uint16_t i = 0; i < h; i++) {
|
||||
for (uint16_t j = 0; j < w / 8; j++) {
|
||||
EPD_WriteByte(color ? ~color[j + i * wb] : 0x00);
|
||||
if (EPD_BWR_MODE)
|
||||
EPD_WriteByte(color ? ~color[j + i * wb] : 0x00);
|
||||
else
|
||||
EPD_WriteByte(black[j + i * wb]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,3 +200,10 @@ const epd_model_t epd_ssd1619_420_bwr = {
|
||||
.res = EPD_RES_400x300,
|
||||
.bwr = true,
|
||||
};
|
||||
|
||||
const epd_model_t epd_ssd1619_420_bw = {
|
||||
.id = EPD_SSD1619_420_BW,
|
||||
.drv = &epd_drv_ssd1619,
|
||||
.res = EPD_RES_400x300,
|
||||
.bwr = false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user