Skip to content

Commit 7501ee7

Browse files
author
Jamie Smith
authored
Document and clean up wifi and LoRa modules, add ability in Python to get non-public targets (#247)
* Add a way to get target attributes for non public targets * Document all WiFi and LoRa modules * Fix some errors * Fix another CMake error
1 parent f19273a commit 7501ee7

File tree

18 files changed

+104
-57
lines changed

18 files changed

+104
-57
lines changed

connectivity/drivers/802.15.4_RF/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# The 'mbed-802.15.4-rf' target is lazily created because there might not be any subdirectories needing it at all.
5-
macro(create_802_15_4_target)
6-
if(NOT TARGET create_802_15_4_target)
5+
macro(create_mbed_802_15_4_target)
6+
if(NOT TARGET mbed-802.15.4-rf)
77
add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL)
88

99
# Nanostack drivers always require Mbed RTOS
@@ -14,29 +14,29 @@ macro(create_802_15_4_target)
1414
mbed-802.15.4-rf
1515
)
1616
endif()
17-
endmacro()
17+
endmacro(create_mbed_802_15_4_target)
1818

1919

2020
if("Freescale" IN_LIST MBED_TARGET_LABELS)
21-
create_802_15_4_target()
21+
create_mbed_802_15_4_target()
2222
add_subdirectory(TARGET_Freescale)
2323
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
24-
create_802_15_4_target()
24+
create_mbed_802_15_4_target()
2525
add_subdirectory(TARGET_Silicon_Labs)
2626
endif()
2727

2828
if("COMPONENT_MICROCHIP_AT86RF=1" IN_LIST MBED_TARGET_DEFINITIONS)
29-
create_802_15_4_target()
29+
create_mbed_802_15_4_target()
3030
add_subdirectory(COMPONENT_MICROCHIP_AT86RF)
3131
endif()
3232

3333
if("COMPONENT_NXP_MCR20A=1" IN_LIST MBED_TARGET_DEFINITIONS)
34-
create_802_15_4_target()
34+
create_mbed_802_15_4_target()
3535
add_subdirectory(COMPONENT_NXP_MCR20A)
3636
endif()
3737

3838
if("COMPONENT_STM_S2_LP=1" IN_LIST MBED_TARGET_DEFINITIONS)
39-
create_802_15_4_target()
39+
create_mbed_802_15_4_target()
4040
add_subdirectory(COMPONENT_STM_S2_LP)
4141
endif()
4242

connectivity/drivers/wifi/CMakeLists.txt

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_library(mbed-wifi STATIC EXCLUDE_FROM_ALL)
4+
# The 'mbed-wifi' target is lazily created because there might not be any subdirectories needing it at all.
5+
macro(create_mbed_wifi_target)
6+
if(NOT TARGET mbed-wifi)
7+
add_library(mbed-wifi STATIC EXCLUDE_FROM_ALL)
58

6-
add_subdirectory(TARGET_WICED EXCLUDE_FROM_ALL)
9+
target_link_libraries(mbed-wifi
10+
PUBLIC
11+
mbed-rtos-flags
12+
mbed-netsocket-api
13+
)
14+
endif()
15+
endmacro()
716

8-
add_subdirectory(TARGET_STM EXCLUDE_FROM_ALL)
17+
18+
# The WICED subdirectory is for wifi drivers developed using Infineon WICED framework.
19+
# https://community.infineon.com/t5/Knowledge-Base-Articles/WICED-Wi-Fi-FAQ/ta-p/247356
20+
if("WICED" IN_LIST MBED_TARGET_LABELS)
21+
create_mbed_wifi_target()
22+
add_subdirectory(TARGET_WICED EXCLUDE_FROM_ALL)
23+
endif()
24+
25+
if("STM" IN_LIST MBED_TARGET_LABELS)
26+
add_subdirectory(TARGET_STM EXCLUDE_FROM_ALL)
27+
endif()
928

1029
if("WHD" IN_LIST MBED_TARGET_LABELS)
30+
create_mbed_wifi_target()
1131
add_subdirectory(COMPONENT_WHD EXCLUDE_FROM_ALL)
1232
endif()
1333

14-
add_subdirectory(esp8266-driver)
34+
if("COMPONENT_ESPRESSIF_ESP8266=1" IN_LIST MBED_TARGET_DEFINITIONS)
35+
create_mbed_wifi_target()
36+
add_subdirectory(COMPONENT_ESPRESSIF_ESP8266)
37+
endif()
1538

16-
target_link_libraries(mbed-wifi
17-
PUBLIC
18-
mbed-rtos-flags
19-
mbed-netsocket-api
20-
)

connectivity/drivers/wifi/esp8266-driver/README.md renamed to connectivity/drivers/wifi/COMPONENT_ESPRESSIF_ESP8266/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Mbed OS driver for the ESP8266 WiFi module.
66

77
ESP8266 modules come in different shapes and formats, but the firmware version is the most important factor. To
88
make sure that the firmware in your module is compatible with Mbed OS, follow the
9-
[Update guide](https://developer.mbed.org/teams/ESP8266/wiki/Firmware-Update).
9+
[Update guide](https://web.archive.org/web/20211025195109/https://os.mbed.com/teams/ESP8266/wiki/Firmware-Update).
1010

1111
This driver supports AT firmware versions 1.3.0 to 1.7.0. We advise updating the
1212
[AT firmware](https://www.espressif.com/en/support/download/at?keys=) to at least version 1.7.0.

0 commit comments

Comments
 (0)