Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repair cleanup MARLIN_F446Zx_TRONXY variant.cpp #25659

Merged
merged 2 commits into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down