example: timer_int: init gpio mode

Signed-off-by: liangkangnan <liangkangnan@163.com>
pull/1/head
liangkangnan 2020-06-14 22:04:38 +08:00
parent 6b01facc48
commit f10a4ac49b
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ int main()
TIMER0_REG(TIMER0_VALUE) = 500000; // 10ms period
TIMER0_REG(TIMER0_CTRL) = 0x07; // enable interrupt and start timer
GPIO_REG(GPIO_DATA) = 0x1;
GPIO_REG(GPIO_CTRL) |= 0x1; // set gpio0 output mode
while (1) {
// 500ms