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 <nrfx_usbd.h>
13 #include <dev/gpio.h>
14 #include <dev/i2c.h>
15 #include <platform/init.h>
16 #include <target/gpioconfig.h>
17 
target_early_init(void)18 void target_early_init(void) {
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     LED1_OFF;
25     LED2_OFF;
26     LED3_OFF;
27     LED4_OFF;
28 
29     nrf52_debug_early_init();
30     // Note: i2c_init will only instantiate an i2c device if proper defines
31     //   are set.  See comments at top of i2c_master.c(platform driver) for more info.
32     i2c_init();
33 }
34 
35 
target_usb_init(void)36 static void target_usb_init(void) {
37 
38 
39 }
40 
41 
target_init(void)42 void target_init(void) {
43     nrf52_debug_init();
44     dprintf(SPEW,"Target: PCA10056 DK...\n");
45 }
46 
47 
48