//turn on power LED (GPIO 7,8,12,13)
li t5, XXX_SYSCTL_BASE + 0x0060
// programing for GPIO mode
lw t6, 0(t5)
nop
or t6, 0x1C
sw t6, 0(t5)
nop
li t5, XXX_PIO_BASE + 0x24 // programming GPIO as out pin
lw t6, 0(t5)
nop
or t6, 0x3180
sw t6, 0(t5)
nop
li t5, XXX_PIO_BASE + 0x20 // set GPIO to low
lw t6, 0(t5)
nop
or t6, 0x3180
sw t6, 0(t5)
nop
li t5, XXX_PIO_BASE + 0x2C // set GPIO to low
lw t6, 0(t5)
nop
or t6, 0x3180
sw t6, 0(t5)
nop
#endif
沒有留言:
張貼留言