1 /*
2  * Copyright (c) 2012 Travis Geiselbrecht
3  *
4  * Use of this source code is governed by a MIT-style
5  * license that can be found in the LICENSE file or at
6  * https://opensource.org/licenses/MIT
7  */
8 #include <lk/err.h>
9 #include <lk/debug.h>
10 #include <target.h>
11 #include <lk/compiler.h>
12 #include <dev/gpio.h>
13 #include <platform/gpio.h>
14 #include <platform/nrf51.h>
15 #include <target/gpioconfig.h>
16 
target_early_init(void)17 void target_early_init(void) {
18     /* configure the usart1 pins */
19     gpio_config(GPIO_LED1, GPIO_OUTPUT);
20     gpio_config(GPIO_LED2, GPIO_OUTPUT);
21     gpio_config(GPIO_LED3, GPIO_OUTPUT);
22     gpio_config(GPIO_LED4, GPIO_OUTPUT);
23 
24     gpio_set(GPIO_LED1,1);
25     gpio_set(GPIO_LED2,1);
26     gpio_set(GPIO_LED3,0);
27     gpio_set(GPIO_LED4,0);
28 
29     nrf51_debug_early_init();
30 }
31 
32 
target_init(void)33 void target_init(void) {
34     nrf51_debug_init();
35     dprintf(SPEW,"Target: PCA10028 DK...\n");
36 }
37