1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 12:08:59 +00:00

enable hw reset of display

This commit is contained in:
Pavol Rusnak 2016-09-28 13:37:05 +02:00
parent 04662215a0
commit 3a67b4d6d2
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 12 additions and 9 deletions

View File

@ -25,17 +25,15 @@ void display_sram_init(void) {
__TIM1_CLK_ENABLE();
__FSMC_CLK_ENABLE();
/*
// LCD_RST/PA3
GPIO_InitStructure.Pin = GPIO_PIN_3;
GPIO_InitTypeDef GPIO_InitStructure;
// LCD_RST/PC14
GPIO_InitStructure.Pin = GPIO_PIN_14;
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStructure.Pull = GPIO_PULLUP;
GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_SET);
*/
GPIO_InitTypeDef GPIO_InitStructure;
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_SET);
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
GPIO_InitStructure.Pull = GPIO_NOPULL;
@ -197,6 +195,11 @@ int display_orientation(int degrees)
void display_init(void) {
display_sram_init();
// hardware reset
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_RESET);
HAL_Delay(20);
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_SET);
HAL_Delay(5);
#if DISPLAY_ILI9341V || DISPLAY_ST7789V
CMD(0x01); // software reset
HAL_Delay(20);

2
vendor/micropython vendored

@ -1 +1 @@
Subproject commit b4f524ee5837b7ae25c2796ff2673f3bd8764d68
Subproject commit 26604dc1ac41b432e617f56f5a35cb53820e70a4