Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
LabAPart/MicroPython: Add Nordic's NUS support
  • Loading branch information
oliviermartin committed Feb 27, 2017
1 parent f490120 commit 296487c
Show file tree
Hide file tree
Showing 5 changed files with 637 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Application/LabAPart/MicroPython/Application.cmake
Expand Up @@ -28,6 +28,17 @@
set(FIRMWARE_HEAP 0x2000)

if (BOARD STREQUAL "Nordic/nRF52DK")
if (NORDIC_NUS)
# Required by buttons_leds_init()
add_definitions(-DGPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS=4)

# This example requires BLE Peripheral support
set(SUPPORT_BLE_PERIPHERAL 1)

# RAM Memory requires by Nordic SoftDevice
set(NORDIC_SOFTDEVICE_RAM_SIZE 0x2080)
endif()

set(SUPPORT_I2C 1)
endif()

Expand Down
9 changes: 9 additions & 0 deletions Application/LabAPart/MicroPython/CMakeLists.txt
Expand Up @@ -31,6 +31,15 @@ find_package(CMSIS)
find_package(PolyMCU)
find_package(MicroPython)

include_directories(.)

set(Firmware_SRCS main.c)

if (BOARD MATCHES "Nordic/*")
if (NORDIC_NUS)
list(APPEND Firmware_SRCS board/nordic/nordic.c)
endif()
endif()

set(Firmware_LIBS ${Board_LIBRARIES} ${PolyMCU_LIBRARIES} ${MicroPython_LIBRARIES})
BUILD_FIRMWARE(Firmware micropython "${Firmware_SRCS}" "${Firmware_LIBS}")

0 comments on commit 296487c

Please sign in to comment.