nrf: add pca10100
This is the nRF52833-DK board. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
b3b6a64ed7
commit
cb4fc894d7
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -212,6 +212,7 @@ jobs:
|
||||
- "particle_xenon"
|
||||
- "pca10056"
|
||||
- "pca10059"
|
||||
- "pca10100"
|
||||
- "pewpew10"
|
||||
- "pewpew_m4"
|
||||
- "pirkey_m0"
|
||||
|
38
ports/nrf/boards/pca10100/board.c
Normal file
38
ports/nrf/boards/pca10100/board.c
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2018 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
|
||||
}
|
48
ports/nrf/boards/pca10100/mpconfigboard.h
Normal file
48
ports/nrf/boards/pca10100/mpconfigboard.h
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Glenn Ruben Bakke
|
||||
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "nrfx/hal/nrf_gpio.h"
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "PCA10100 nRF52833 Dongle"
|
||||
#define MICROPY_HW_MCU_NAME "nRF52833"
|
||||
|
||||
#define MICROPY_HW_LED_STATUS (&pin_P0_13)
|
||||
#define MICROPY_HW_LED_TX (&pin_P0_14)
|
||||
#define MICROPY_HW_LED_RX (&pin_P0_15)
|
||||
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
|
||||
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (60*1024)
|
||||
|
||||
#define CIRCUITPY_BLE_CONFIG_SIZE (12*1024)
|
||||
|
||||
// Reduce nRF SoftRadio memory usage
|
||||
#define BLEIO_VS_UUID_COUNT 10
|
||||
#define BLEIO_HVN_TX_QUEUE_SIZE 2
|
||||
#define BLEIO_CENTRAL_ROLE_COUNT 2
|
||||
#define BLEIO_PERIPH_ROLE_COUNT 2
|
||||
#define BLEIO_TOTAL_CONNECTION_COUNT 2
|
||||
#define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 2)
|
25
ports/nrf/boards/pca10100/mpconfigboard.mk
Normal file
25
ports/nrf/boards/pca10100/mpconfigboard.mk
Normal file
@ -0,0 +1,25 @@
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x802A
|
||||
USB_PRODUCT = "PCA10100"
|
||||
USB_MANUFACTURER = "Nordic Semiconductor"
|
||||
|
||||
MCU_CHIP = nrf52833
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BUSIO = 1
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||
CIRCUITPY_NVM = 0
|
||||
CIRCUITPY_PIXELBUF = 0
|
||||
CIRCUITPY_RGBMATRIX = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
CIRCUITPY_RTC = 1
|
||||
CIRCUITPY_TOUCHIO = 0
|
||||
CIRCUITPY_ULAB = 0
|
||||
|
||||
# These defines must be overridden before mpconfigboard.h is included, which is
|
||||
# why they are passed on the command line.
|
||||
CFLAGS += -DSPIM3_BUFFER_SIZE=0 -DSOFTDEVICE_RAM_SIZE='(32*1024)'
|
54
ports/nrf/boards/pca10100/pins.c
Normal file
54
ports/nrf/boards/pca10100/pins.c
Normal file
@ -0,0 +1,54 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P0_17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_20) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_P0_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_P0_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_P0_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_P0_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_P0_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_P0_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_P0_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_P0_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_P0_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_P0_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_P0_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_P0_14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_P0_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P0_16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_P0_18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_P0_24) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_P0_25) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_P1_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_P1_09) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P0_14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED3), MP_ROM_PTR(&pin_P0_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED4), MP_ROM_PTR(&pin_P0_16) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_BUTTON1_DEFAULT), MP_ROM_PTR(&pin_P0_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BUTTON1_OPTIONAL), MP_ROM_PTR(&pin_P1_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BUTTON2_DEFAULT), MP_ROM_PTR(&pin_P0_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BUTTON2_OPTIONAL), MP_ROM_PTR(&pin_P1_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BUTTON3), MP_ROM_PTR(&pin_P0_24) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BUTTON4), MP_ROM_PTR(&pin_P0_25) },
|
||||
};
|
||||
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|
Loading…
Reference in New Issue
Block a user