Skip to content

Commit

Permalink
Merge pull request project-chip#52 from fkjagodzinski/ble-manager
Browse files Browse the repository at this point in the history
Add BLEManagerImpl for mbed-os
  • Loading branch information
pan- authored Mar 11, 2021
2 parents f2e9bad + 68c064f commit 063a697
Show file tree
Hide file tree
Showing 10 changed files with 1,195 additions and 19 deletions.
4 changes: 4 additions & 0 deletions config/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ list(APPEND CHIP_CFLAGS_C ${CMAKE_C_FLAGS_INIT})
mbed_get_lang_compile_flags(CHIP_CFLAGS_CC mbed-core CXX)
list(APPEND CHIP_CFLAGS_CC ${CMAKE_CXX_FLAGS_INIT})

# Add support for Mbed BLE
mbed_get_target_common_compile_flags(CHIP_MBEDBLE_CFLAGS mbed-ble)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDBLE_CFLAGS})

# Add support for Mbed event
mbed_get_target_common_compile_flags(CHIP_MBEDEVENTS_CFLAGS mbed-events)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDEVENTS_CFLAGS})
Expand Down
8 changes: 7 additions & 1 deletion examples/shell/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS)
)
endif()

target_link_libraries(${APP_TARGET} mbed-os mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip)
if("BlueNRG_MS" IN_LIST MBED_TARGET_LABELS)
target_link_libraries(${APP_TARGET}
mbed-ble-blue_nrg
)
endif()

target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip)

mbed_set_post_build(${APP_TARGET})

Expand Down
14 changes: 7 additions & 7 deletions examples/shell/mbed/mbed_app.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"macros" : [
"MBEDTLS_USER_CONFIG_FILE=\"chip_mbedtls_config.h\"",
"MBED_CONF_LWIP_IPV6_ENABLED=1",
"MBED_CONF_LWIP_RAW_SOCKET_ENABLED=1",
"MBED_CONF_ISM43362_PROVIDE_DEFAULT=1"
"MBEDTLS_USER_CONFIG_FILE=\"chip_mbedtls_config.h\""
],
"target_overrides": {
"*": {
"lwip.ipv6-enabled": true,
"lwip.raw-socket-enabled": true
"lwip.raw-socket-enabled": true,
"platform.stdio-baud-rate": 115200
},
"DISCO_L475VG_IOT01A": {
"lwip.ipv6-enabled": true,
"lwip.raw-socket-enabled": true,
"target.components_add": ["wifi_ism43362"],
"target.components_add": ["wifi_ism43362", "BlueNRG_MS"],
"ism43362.provide-default": true,
"target.network-default-interface-type": "WIFI",
"target.macros_add" : ["MBEDTLS_SHA1_C"]
"target.macros_add" : ["MBEDTLS_SHA1_C"],
"target.features_add": ["BLE"],
"target.extra_labels_add": ["CORDIO"]
}
}
}
8 changes: 5 additions & 3 deletions src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,16 @@ if (chip_device_platform != "none" && chip_device_platform != "external") {
}
} else if (chip_device_platform == "mbed") {
sources += [
"mbed/BLEManagerImpl.cpp",
"mbed/BLEManagerImpl.h",
"mbed/ConfigurationManagerImpl.cpp",
"mbed/SystemTimeSupport.cpp",
"mbed/PlatformManagerImpl.cpp",
"mbed/ConnectivityManagerImpl.cpp",
"mbed/ConnectivityManagerImpl.h",
"mbed/DeviceNetworkProvisioningDelegateImpl.cpp",
"mbed/DeviceNetworkProvisioningDelegateImpl.h",
"mbed/MbedConfig.cpp"
"mbed/MbedConfig.cpp",
"mbed/PlatformManagerImpl.cpp",
"mbed/SystemTimeSupport.cpp",
]
}

Expand Down
Loading

0 comments on commit 063a697

Please sign in to comment.