Skip to content

Commit 4382389

Browse files
committed
fix typos, remove incorrect pca10059 example; add default buses for pca10056; improve board names for pca boards
1 parent 9ea809b commit 4382389

File tree

8 files changed

+17
-35
lines changed

8 files changed

+17
-35
lines changed

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@
115115
"ports/minimal",
116116
"ports/nrf/device",
117117
"ports/nrf/drivers",
118-
"ports/nrf/hal",
119118
"ports/nrf/modules",
120119
"ports/nrf/nrfx",
120+
"ports/nrf/peripherals",
121121
"ports/nrf/usb",
122122
"ports/pic16bit",
123123
"ports/qemu-arm",

ports/nrf/boards/feather_nrf52832/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
2222
{ MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) },
2323
{ MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) },
2424

25-
{ MP_ROM_QSTR(MP_QSTR_27), MP_ROM_PTR(&pin_P0_27) },
25+
{ MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P0_27) },
2626

2727
{ MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_P0_30) },
2828
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_30) },

ports/nrf/boards/pca10040/mpconfigboard.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* The MIT License (MIT)
55
*
66
* Copyright (c) 2016 Glenn Ruben Bakke
7+
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
78
*
89
* Permission is hereby granted, free of charge, to any person obtaining a copy
910
* of this software and associated documentation files (the "Software"), to deal
@@ -28,8 +29,8 @@
2829
#define MICROPY_HW_MCU_NAME "nRF52832"
2930
#define MICROPY_PY_SYS_PLATFORM "nRF52-DK"
3031

31-
#define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 11)
32-
#define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 12)
32+
#define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 8)
33+
#define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6)
3334
#define MICROPY_HW_UART_HWFC (0)
3435

3536
#define PORT_HEAP_SIZE (32 * 1024)

ports/nrf/boards/pca10056/mpconfigboard.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#define MICROPY_HW_BOARD_NAME "PCA10056"
27+
#define MICROPY_HW_BOARD_NAME "PCA10056 nRF52840-DK"
2828
#define MICROPY_HW_MCU_NAME "nRF52840"
2929
#define MICROPY_PY_SYS_PLATFORM "nRF52840-DK"
3030

@@ -38,3 +38,13 @@
3838

3939
// Temp (could be removed) 0: usb cdc (default), 1 : hwuart (jlink)
4040
#define CFG_HWUART_FOR_SERIAL 0
41+
42+
#define DEFAULT_I2C_BUS_SCL (&pin_P0_27)
43+
#define DEFAULT_I2C_BUS_SDA (&pin_P0_26)
44+
45+
#define DEFAULT_SPI_BUS_SCK (&pin_P1_15)
46+
#define DEFAULT_SPI_BUS_MOSI (&pin_P1_13)
47+
#define DEFAULT_SPI_BUS_MISO (&pin_P1_14)
48+
49+
#define DEFAULT_UART_BUS_RX (&pin_P1_01)
50+
#define DEFAULT_UART_BUS_TX (&pin_P1_02)

ports/nrf/boards/pca10059/examples/buttons.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

ports/nrf/boards/pca10059/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#define MICROPY_HW_BOARD_NAME "PCA10059"
27+
#define MICROPY_HW_BOARD_NAME "PCA10059 nRF52840 Dongle"
2828
#define MICROPY_HW_MCU_NAME "nRF52840"
2929
#define MICROPY_PY_SYS_PLATFORM "nRF52840-DK"
3030

ports/nrf/common-hal/microcontroller/__init__.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
7979
{ MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) },
8080
{ MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) },
8181
{ MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) },
82-
{ MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) },
8382
{ MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) },
8483
{ MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) },
8584
{ MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) },

ports/nrf/peripherals/nrf/pins.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,4 @@ extern const mp_obj_type_t mcu_pin_type;
6767
#include "nrf52840/pins.h"
6868
#endif
6969

70-
//**************extern const mp_obj_type_t mcu_pin_type;
71-
7270
#endif // __MICROPY_INCLUDED_NRF_PERIPHERALS_PINS_H__

0 commit comments

Comments
 (0)