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/init.h>
14 #include <target/gpioconfig.h>
15 
target_early_init(void)16 void target_early_init(void) {
17     /* configure the usart1 pins */
18     gpio_config(GPIO_LED1, GPIO_OUTPUT);
19     gpio_config(GPIO_LED2, GPIO_OUTPUT);
20     gpio_config(GPIO_LED3, GPIO_OUTPUT);
21     gpio_config(GPIO_LED4, GPIO_OUTPUT);
22 
23     gpio_set(GPIO_LED1,1);
24     gpio_set(GPIO_LED2,1);
25     gpio_set(GPIO_LED3,0);
26     gpio_set(GPIO_LED4,0);
27 
28     nrf52_debug_early_init();
29 }
30 
31 
target_init(void)32 void target_init(void) {
33     nrf52_debug_init();
34     dprintf(SPEW,"Target: PCA10040 DK...\n");
35 }
36