diff options
author | Klaus Goger <klaus.goger@theobroma-systems.com> | 2016-09-14 16:46:06 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2016-09-18 20:22:03 +0200 |
commit | b8bf976671532bff0dab09ae5ab788bd1bf3343c (patch) | |
tree | 57420fe78b07d531a4a9f21683b552099163250c /board | |
parent | 4a47429be7548de690e18ded7e4399798054d83d (diff) |
sun9i: armadillo: led blink for boot feedback
Diffstat (limited to 'board')
-rw-r--r-- | board/sunxi/board.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index bc90032866..d486c66243 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -85,6 +85,18 @@ int board_init(void) /* CNTFRQ == 24 MHz */ asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r"(24000000)); } + gpio_request(SUNXI_GPD(23), "LED"); + sunxi_gpio_set_cfgpin(SUNXI_GPD(23), SUNXI_GPIO_OUTPUT); + + // Blink LED + int i; + for(i=0;i<=2;i++) + { + mdelay(30); + gpio_direction_output(SUNXI_GPD(23), 0); + mdelay(30); + gpio_direction_output(SUNXI_GPD(23), 1); + } ret = axp_gpio_init(); if (ret) |