Skip to content

Commit a801dd7

Browse files
INPUT_PULLUP doesn't appear to enable an internal pull-up resistor
Incorrect register base address used by SET_PIN_PULLUP macro in scss_registers.h to enable/disable internal pull-ups Signed-off-by: Dan O'Donovan <dan@emutex.com>
1 parent d45290e commit a801dd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/libarc32_edu/common/scss_registers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
/* Read current pull-up reg, Zero pin bit, OR new mode into these bits, write reg - thereby preserving other pin mode settings */
282282
#define SET_PULLUP_REG( mux_reg, enable, pin ) MMIO_REG_VAL(mux_reg) = ( MMIO_REG_VAL(mux_reg) & ~( 1 << (pin) ) ) | ( enable << (pin) )
283283
/* Calculate mux register address from pin number and calculate pin number within that register - call SET_MUX_REG */
284-
#define SET_PIN_PULLUP( pin_no, enable) SET_PULLUP_REG( (((pin_no/32)*4 )+ MUX_BASE), enable, pin_no % 32)
284+
#define SET_PIN_PULLUP( pin_no, enable) SET_PULLUP_REG( (((pin_no/32)*4 )+ PULLUP_BASE), enable, pin_no % 32)
285285

286286
#define MUX_BASE QRK_PMUX_SELECT_0
287287
/* Read current Mux reg, Zero pin bits, OR new mode into these bits, write reg - thereby preserving other pin mode settings */

0 commit comments

Comments
 (0)