Skip to content

Commit

Permalink
[nrf][pca10040] fix platform incompatibilities
Browse files Browse the repository at this point in the history
When the nrf52xxx platform was changed to use the Nordic nrfx
libraries the pca10040 target was broken due to differences in
how the platform handled initialization.
  • Loading branch information
hollanderic committed Oct 10, 2020
1 parent e0487f9 commit 38dd509
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions platform/nrf52xxx/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ void platform_init(void) {

// Note: i2c_init will only instantiate an i2c device if proper defines
// are set. See comments at top of i2c_master.c for more info.
#if (NRFX_TWIM_ENABLED)
i2c_init();
#endif
}
2 changes: 0 additions & 2 deletions target/nrf-pca10040/include/target/gpioconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#ifndef __TARGET_GPIOCONFIG_H
#define __TARGET_GPIOCONFIG_H

#include <platform/gpio.h>

#define GPIO_LED1 17
#define GPIO_LED2 18
#define GPIO_LED3 19
Expand Down
3 changes: 1 addition & 2 deletions target/nrf-pca10040/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#include <target.h>
#include <lk/compiler.h>
#include <dev/gpio.h>
#include <platform/gpio.h>
#include <platform/nrf52.h>
#include <platform/init.h>
#include <target/gpioconfig.h>

void target_early_init(void) {
Expand Down

0 comments on commit 38dd509

Please sign in to comment.