From 824bc630cb9fd01be20de8f0de436bcb06369d0c Mon Sep 17 00:00:00 2001 From: Carsten Keller Date: Sun, 9 Jun 2024 17:58:19 +0200 Subject: [PATCH] Fix Ansteuerung LCD --- Source/Display.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Display.cpp b/Source/Display.cpp index 6abf15f..85d8630 100644 --- a/Source/Display.cpp +++ b/Source/Display.cpp @@ -166,12 +166,14 @@ namespace ElektronischeLast LL_GPIO_ResetOutputPin(GPIOB, PIN_RS | PIN_RW | PIN_E); std::uint32_t tmp = command >> 4U; tmp |= ((~(command >> 4U) & 0xFU) << GPIO_BSRR_BR0_Pos); + LL_GPIO_SetOutputPin(GPIOB, tmp); __NOP(); LL_GPIO_SetOutputPin(GPIOB, PIN_E); pulse_delay(); LL_GPIO_ResetOutputPin(GPIOB, PIN_E); - tmp = command; + tmp = command & 0x0FU; tmp |= ((~command & 0xFU) << GPIO_BSRR_BR0_Pos); + LL_GPIO_SetOutputPin(GPIOB, tmp); __NOP(); LL_GPIO_SetOutputPin(GPIOB, PIN_E); pulse_delay();