Skip to content

Commit

Permalink
make gpio.h stock again and add to supression lists the check on gpio…
Browse files Browse the repository at this point in the history
….h since we are not even touching it and we don't plan on ever doing so
  • Loading branch information
devtekve committed Dec 14, 2024
1 parent 5fcc10b commit 958ddfe
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 958ddfe

Please sign in to comment.