Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c94470f

Browse files
author
Werner Almesberger
committed
gpio-s3c6410.c (set_h): correct offset of pull-up register (by Andy Pevy)
Andy wrote: In the set_h function, the offset used for calculating the pud register address is set to 8 but the actual offset for the 3 registers that use the function (GPIO ports H, K and L) should be 0x0C. I have changed my code and I can now successfully use port K on my application.
1 parent 4fb1be1 commit c94470f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/target/gpio/gpio-s3c6410.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ static void set_h(const struct port *p, int num, int c, int d, int r)
204204
*(uint32_t *) (mem+p->offset+4) = dat;
205205
}
206206

207-
pud = *(uint32_t *) (mem+p->offset+8);
207+
pud = *(uint32_t *) (mem+p->offset+12);
208208
pud = (pud & ~(15 << (num*4))) | (r << (num*4));
209-
*(uint32_t *) (mem+p->offset+8) = pud;
209+
*(uint32_t *) (mem+p->offset+12) = pud;
210210
}
211211

212212

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /