Skip to content

Commit

Permalink
Fixed IPL GPIO code
Browse files Browse the repository at this point in the history
  • Loading branch information
nonarkitten committed Apr 17, 2023
1 parent 4f5f271 commit 4c993b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions hal/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ uint16_t GetIPLx(void) {
GPIO2_OE->BIT.OUTPUTEN7 = 1;
GPIO2_OE->BIT.OUTPUTEN8 = 1;
asm volatile("nop");
if((GPIO2_DATAIN->BIT.DATAIN6)) sr |= 0x0400;
if((GPIO2_DATAIN->BIT.DATAIN7)) sr |= 0x0200;
if((GPIO2_DATAIN->BIT.DATAIN8)) sr |= 0x0100;
if(!(GPIO2_DATAIN->BIT.DATAIN6)) sr |= 0x0400;
if(!(GPIO2_DATAIN->BIT.DATAIN7)) sr |= 0x0200;
if(!(GPIO2_DATAIN->BIT.DATAIN8)) sr |= 0x0100;
return sr;
}
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ endif
# Compiler optimizations
ifeq ($(BUILD),release)
# Optimize for release and raise the bar for errors
CCFLAGS_OPT := -Os -ffast-math -Werror -s
CCFLAGS_OPT := -O3 -ffast-math -Werror -s
else
# Optimize for debugging, but include basic optimizers for not-terrible-code
CCFLAGS_OPT := -Og -g3 -ggdb -D_DEBUG
CCFLAGS_OPT := -Og -g3 -ggdb -ftree-vectorize -D_DEBUG
endif

# Set noisey output
Expand Down

0 comments on commit 4c993b2

Please sign in to comment.