You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/embed/trezorhal/stm32u5/displays/dsi.h

27 lines
683 B

#ifndef DSI_H_
#define DSI_H_
#include STM32_HAL_H
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_ARGB8888
#define DISPLAY_FRAMEBUFFER_WIDTH 768
#define DISPLAY_FRAMEBUFFER_HEIGHT 480
#define DISPLAY_FRAMEBUFFER_OFFSET_X 120
#define DISPLAY_FRAMEBUFFER_OFFSET_Y 120
#define TREZOR_FONT_BPP 4
#define DISPLAY_EFFICIENT_CLEAR 1
extern uint8_t* const DISPLAY_DATA_ADDRESS;
uint32_t rgb565_to_rgb888(uint16_t color);
static inline void display_pixel(uint8_t* fb, int16_t x, int16_t y,
uint16_t color) {
uint32_t p = 4 * ((y + 120) * DISPLAY_FRAMEBUFFER_WIDTH + (x + 120));
uint32_t c = rgb565_to_rgb888(color);
*((uint32_t*)(fb + p)) = c;
}
#endif