Skip to content

Commit

Permalink
Fuck misra
Browse files Browse the repository at this point in the history
  • Loading branch information
devtekve committed Dec 13, 2024
1 parent 1d0eda0 commit 7daa0a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion board/drivers/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void set_gpio_alternate(GPIO_TypeDef *GPIO, unsigned int pin, unsigned int mode)
void set_gpio_pullup(GPIO_TypeDef *GPIO, unsigned int pin, unsigned int mode) {
ENTER_CRITICAL();
uint32_t tmp = GPIO->PUPDR;
tmp &= ~((uint32_t)3U << ((uint32_t)(pin * 2U)));
tmp &= ~(3U << (pin * 2U));
tmp |= (mode << (pin * 2U));
register_set(&(GPIO->PUPDR), tmp, 0xFFFFFFFFU);
EXIT_CRITICAL();
Expand Down
1 change: 1 addition & 0 deletions tests/misra/suppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ unusedFunction:*/interrupt_handlers*.h
# cppcheck from 2.5 -> 2.13. they are listed here to separate the update from
# fixing the violations and all are intended to be removed soon after
misra-c2012-2.5 # unused macros. a few legit, rest aren't common between F4/H7 builds. should we do this in the unusedFunction pass?
misra-c2012-12.2:*/gpio.h # Suppress 12.2 for any file named gpio.h

0 comments on commit 7daa0a7

Please sign in to comment.