forked from len0rd/rockbox
Clipv2: fix button reading on some models
We neet to setup the XPD to work as GPIO storage unaffected Tested on working-already Clipv2 and on a 'brickable' clipv2 Change-Id: Idcbdfb6bd50d51b7f6f7e00b21df24fac9b3a6d8
This commit is contained in:
parent
e7892c9851
commit
d1b47c2eeb
4 changed files with 15 additions and 7 deletions
|
|
@ -29,6 +29,7 @@
|
|||
.set CGU_PROC, 0xC80F0010
|
||||
.set CGU_PERI, 0xC80F0014
|
||||
.set CGU_DBOP, 0xC80F0038
|
||||
.set CCU_IO, 0xC810000C
|
||||
.set DBOP, 0xC8120000
|
||||
.set I2C_BASE, 0xC8070000
|
||||
.set I2C_DATA, 0x00
|
||||
|
|
@ -111,6 +112,11 @@ uclcopy:
|
|||
.set row, (1<<4) /* enable output on D4 */
|
||||
.set col, (1<<0) /* read keyscan column D0 */
|
||||
|
||||
ldr r0, =CCU_IO
|
||||
ldr r1, [r0]
|
||||
bic r1, r1, #(3<<2) @ XPD works as general purpose IO
|
||||
str r1, [r0]
|
||||
|
||||
ldr r0, =GPIOD
|
||||
mov r1, #((1<<5)|(1<<4)|(1<<3)) /* all rows as output */
|
||||
str r1, [r0, #0x400]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue