mirror of
https://github.com/trezor/trezor-firmware.git
synced 2026-02-20 00:33:30 +01:00
fixup! fixup! feat(core): new eink/epaper display driver introduction
This commit is contained in:
@@ -534,7 +534,7 @@ static void display_img_show(const uint8_t* img_data, uint16_t x, uint16_t y,
|
||||
display_spi_transmit(DISPLAY_EP_SPI_TX_CMD, (uint8_t[]){0x10}, 1);
|
||||
|
||||
for (int i = y; i < (y + h); i++) {
|
||||
for (int j = x; j < (x + w) / 4; j++) {
|
||||
for (int j = x / 4; j < (x + w) / 4; j++) {
|
||||
uint8_t img_data_tmp =
|
||||
display_img_color_decode(img_data[i * DISPLAY_WIDTH / 4 + j]);
|
||||
display_spi_transmit(DISPLAY_EP_SPI_TX_DATA, &img_data_tmp, 1);
|
||||
@@ -588,17 +588,21 @@ void display_ep_deinit(display_content_mode_t mode) {
|
||||
|
||||
void display_ep_demo(void) {
|
||||
display_color_fill(DISPLAY_COLOR_BLACK);
|
||||
systick_delay_ms(5000);
|
||||
systick_delay_ms(2000);
|
||||
display_color_fill(DISPLAY_COLOR_WHITE);
|
||||
systick_delay_ms(5000);
|
||||
systick_delay_ms(2000);
|
||||
display_color_fill(DISPLAY_COLOR_RED);
|
||||
systick_delay_ms(5000);
|
||||
systick_delay_ms(2000);
|
||||
display_color_fill(DISPLAY_COLOR_YELLOW);
|
||||
systick_delay_ms(5000);
|
||||
systick_delay_ms(2000);
|
||||
|
||||
display_img_show(test_img, 0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT);
|
||||
systick_delay_ms(2000);
|
||||
display_color_fill(DISPLAY_COLOR_WHITE);
|
||||
display_img_show(test_img, 0, 0, DISPLAY_WIDTH/2, DISPLAY_HEIGHT/2);
|
||||
systick_delay_ms(2000);
|
||||
display_color_fill(DISPLAY_COLOR_WHITE);
|
||||
display_img_show(test_img, DISPLAY_WIDTH/2, DISPLAY_HEIGHT/2, DISPLAY_WIDTH/2, DISPLAY_HEIGHT/2);
|
||||
|
||||
while (1) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user