From d05acb762634acff6a1cefc3a2ed32819c23e88f Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon, 10 Apr 2023 21:16:52 +1200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20MARLIN=5FF446Zx=5FTRONXY?= =?UTF-8?q?=20variant=20(#25659)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to 9be1554f --- .../variants/MARLIN_F446Zx_TRONXY/variant.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp index 2d94ee763a4..7e18e33f7e2 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp @@ -173,15 +173,15 @@ uint32_t myvar[] = {1,2,3,4,5,6,7,8}; void myshow(int fre, int times) // YSZ-WORK { uint32_t index = 10; - RCC->AHB1ENR |= 1 << 6; // port G clock - GPIOG->MODER &= ~(3UL << 2 * index); // clear old mode - GPIOG->MODER |= 1 << 2 * index; // mode is output - GPIOG->OSPEEDR &= ~(3UL << 2 * index) // Clear old output speed - GPIOG->OSPEEDR |= 2 << 2 * index; // Set output speed - GPIOG->OTYPER &= ~(1UL << index) // clear old output - GPIOG->OTYPER |= 0 << index; // Set the output mode to push-pull - GPIOG->PUPDR &= ~(3 << 2 * index) // Clear the original settings first - GPIOG->PUPDR |= 1 << 2 * index; // Set new up and down + RCC->AHB1ENR |= 1 << 6; // port G clock + GPIOG->MODER &= ~(3UL << 2 * index); // clear old mode + GPIOG->MODER |= 1 << 2 * index; // mode is output + GPIOG->OSPEEDR &= ~(3UL << 2 * index); // Clear old output speed + GPIOG->OSPEEDR |= 2 << 2 * index; // Set output speed + GPIOG->OTYPER &= ~(1UL << index); // clear old output + GPIOG->OTYPER |= 0 << index; // Set the output mode to push-pull + GPIOG->PUPDR &= ~(3 << 2 * index); // Clear the original settings first + GPIOG->PUPDR |= 1 << 2 * index; // Set new up and down while (times != 0) { GPIOG->BSRR = 1UL << index; for (int i = 0; i < fre; i++)