mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
embed: use static where appropriate in display-stm32.h
This commit is contained in:
parent
68ef9b9322
commit
7b8266221d
@ -105,7 +105,7 @@ static void display_set_window(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_set_orientation(int degrees)
|
static void display_set_orientation(int degrees)
|
||||||
{
|
{
|
||||||
#if DISPLAY_ILI9341V || DISPLAY_GC9307 || DISPLAY_ST7789V
|
#if DISPLAY_ILI9341V || DISPLAY_GC9307 || DISPLAY_ST7789V
|
||||||
#define RGB (1 << 3)
|
#define RGB (1 << 3)
|
||||||
@ -154,12 +154,12 @@ void display_set_orientation(int degrees)
|
|||||||
BUFFER_OFFSET.y = BY ? (MAX_DISPLAY_RESY - DISPLAY_RESY) : 0;
|
BUFFER_OFFSET.y = BY ? (MAX_DISPLAY_RESY - DISPLAY_RESY) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_set_backlight(int val)
|
static void display_set_backlight(int val)
|
||||||
{
|
{
|
||||||
TIM1->CCR1 = LED_PWM_TIM_PERIOD * val / 255;
|
TIM1->CCR1 = LED_PWM_TIM_PERIOD * val / 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_hardware_reset(void)
|
static void display_hardware_reset(void)
|
||||||
{
|
{
|
||||||
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_RESET); // LCD_RST/PC14
|
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_RESET); // LCD_RST/PC14
|
||||||
// wait 10 milliseconds. only needs to be low for 10 microseconds.
|
// wait 10 milliseconds. only needs to be low for 10 microseconds.
|
||||||
@ -324,7 +324,6 @@ void display_init(void)
|
|||||||
CMD(0xF1); DATA(0x59); DATA(0xCF); DATA(0xCF); DATA(0x35); DATA(0x37); DATA(0x8F);
|
CMD(0xF1); DATA(0x59); DATA(0xCF); DATA(0xCF); DATA(0x35); DATA(0x37); DATA(0x8F);
|
||||||
// SET_GAMMA4
|
// SET_GAMMA4
|
||||||
CMD(0xF3); DATA(0x58); DATA(0xCF); DATA(0xCF); DATA(0x35); DATA(0x37); DATA(0x8F);
|
CMD(0xF3); DATA(0x58); DATA(0xCF); DATA(0xCF); DATA(0x35); DATA(0x37); DATA(0x8F);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if DISPLAY_ST7789V
|
#if DISPLAY_ST7789V
|
||||||
CMD(0x35); DATA(0x00); // TEON: Tearing Effect Line On; V-blanking only
|
CMD(0x35); DATA(0x00); // TEON: Tearing Effect Line On; V-blanking only
|
||||||
|
Loading…
Reference in New Issue
Block a user