From 70dd74a594c31d12f84a9d535a8825a303ed4867 Mon Sep 17 00:00:00 2001 From: Mikael Mogren Date: Mon, 6 Apr 2026 13:44:37 +0200 Subject: [PATCH] Fix generic spi graphics setup --- src/nanoFramework.Graphics/Graphics/Displays/Generic_SPI.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nanoFramework.Graphics/Graphics/Displays/Generic_SPI.cpp b/src/nanoFramework.Graphics/Graphics/Displays/Generic_SPI.cpp index 0e72449eb5..923cf2c28d 100644 --- a/src/nanoFramework.Graphics/Graphics/Displays/Generic_SPI.cpp +++ b/src/nanoFramework.Graphics/Graphics/Displays/Generic_SPI.cpp @@ -31,7 +31,7 @@ void ProcessCommand(CLR_RT_HeapBlock_Array *array) // This is a sleep instruction if (*cmd == GraphicDriverCommandType::GraphicDriverCommandType_Sleep) { - OS_DELAY(*cmd * *size * 10); + OS_DELAY(*size * 10); } // This is the normal command else if (*cmd == GraphicDriverCommandType::GraphicDriverCommandType_Command) @@ -154,11 +154,10 @@ void DisplayDriver::SetupDisplayAttributes() if (g_DisplayInterfaceConfig.GenericDriverCommands.Height == 0) { Attributes.ShorterSide = g_DisplayInterfaceConfig.Screen.height; - ; } else { - Attributes.LongerSide = g_DisplayInterfaceConfig.GenericDriverCommands.Height; + Attributes.ShorterSide = g_DisplayInterfaceConfig.GenericDriverCommands.Height; } Attributes.PowerSave = PowerSaveState::NORMAL;