Skip to content

Commit f19273a

Browse files
author
Jamie Smith
authored
Begin documenting Mbed OS target features and components (#240)
* Start on documenting features and components * Missed some renames * Go through all cellular and 802.15.4 modules * Fix build * Fix style * Update copyright year
1 parent d1b0cca commit f19273a

File tree

228 files changed

+732
-2876
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+732
-2876
lines changed

connectivity/drivers/802.15.4_RF/CMakeLists.txt

+31-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL)
4+
# 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)
7+
add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL)
8+
9+
# Nanostack drivers always require Mbed RTOS
10+
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags)
11+
12+
target_link_libraries(mbed-nanostack
13+
INTERFACE
14+
mbed-802.15.4-rf
15+
)
16+
endif()
17+
endmacro()
518

6-
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags)
719

820
if("Freescale" IN_LIST MBED_TARGET_LABELS)
21+
create_802_15_4_target()
922
add_subdirectory(TARGET_Freescale)
10-
add_subdirectory(mcr20a-rf-driver)
1123
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
24+
create_802_15_4_target()
1225
add_subdirectory(TARGET_Silicon_Labs)
13-
elseif("STM" IN_LIST MBED_TARGET_LABELS)
14-
add_subdirectory(stm-s2lp-rf-driver)
1526
endif()
1627

17-
add_subdirectory(atmel-rf-driver)
28+
if("COMPONENT_MICROCHIP_AT86RF=1" IN_LIST MBED_TARGET_DEFINITIONS)
29+
create_802_15_4_target()
30+
add_subdirectory(COMPONENT_MICROCHIP_AT86RF)
31+
endif()
32+
33+
if("COMPONENT_NXP_MCR20A=1" IN_LIST MBED_TARGET_DEFINITIONS)
34+
create_802_15_4_target()
35+
add_subdirectory(COMPONENT_NXP_MCR20A)
36+
endif()
37+
38+
if("COMPONENT_STM_S2_LP=1" IN_LIST MBED_TARGET_DEFINITIONS)
39+
create_802_15_4_target()
40+
add_subdirectory(COMPONENT_STM_S2_LP)
41+
endif()
42+
1843

19-
target_link_libraries(mbed-nanostack
20-
INTERFACE
21-
mbed-802.15.4-rf
22-
)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(ALT1250)
4+
if("COMPONENT_ALTAIR_ALT1250=1" IN_LIST MBED_TARGET_DEFINITIONS)
5+
add_subdirectory(COMPONENT_ALTAIR_ALT1250)
6+
endif()
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if("STMOD_CELLULAR" IN_LIST MBED_TARGET_LABELS)
4+
if("COMPONENT_STMOD_CELLULAR=1" IN_LIST MBED_TARGET_DEFINITIONS)
55
add_subdirectory(COMPONENT_STMOD_CELLULAR)
66
endif()
77

@@ -11,10 +11,4 @@ add_subdirectory(GENERIC)
1111
add_subdirectory(MultiTech)
1212
add_subdirectory(QUECTEL)
1313
add_subdirectory(RiotMicro)
14-
add_subdirectory(TELIT)
15-
add_subdirectory(UBLOX)
16-
17-
target_include_directories(mbed-cellular
18-
PUBLIC
19-
.
20-
)
14+
add_subdirectory(TELIT)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(CINTERION)
4+
if("COMPONENT_GEMALTO_CINTERION=1" IN_LIST MBED_TARGET_DEFINITIONS)
5+
add_subdirectory(CINTERION)
6+
endif()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(GENERIC_AT3GPP)
4+
if("COMPONENT_GENERIC_AT3GPP=1" IN_LIST MBED_TARGET_DEFINITIONS)
5+
add_subdirectory(COMPONENT_GENERIC_AT3GPP)
6+
endif()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(DragonflyNano)
4+
if("COMPONENT_MULTITECH_DRAGONFLY_NANO_CELLULAR=1" IN_LIST MBED_TARGET_DEFINITIONS)
5+
add_subdirectory(COMPONENT_MULTITECH_DRAGONFLY_NANO_CELLULAR)
6+
endif()

connectivity/drivers/cellular/MultiTech/DragonflyNano/PPP/CMakeLists.txt renamed to connectivity/drivers/cellular/MultiTech/DragonflyNano/COMPONENT_MULTITECH_DRAGONFLY_NANO_CELLULAR/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ target_sources(mbed-cellular
1111
SARA4_PPP.cpp
1212
SARA4_PPP_CellularNetwork.cpp
1313
)
14+
15+
if("MTS_DRAGONFLY_L471QG" IN_LIST MBED_TARGET_LABELS)
16+
add_subdirectory(TARGET_MTS_DRAGONFLY_L471QG)
17+
endif()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020 ARM Limited. All rights reserved.
1+
# Copyright (c) 2024 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

44
target_include_directories(mbed-cellular
@@ -8,5 +8,5 @@ target_include_directories(mbed-cellular
88

99
target_sources(mbed-cellular
1010
PRIVATE
11-
TELIT_HE910.cpp
12-
)
11+
ONBOARD_SARA4_PPP.cpp
12+
)

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L471xG/TARGET_MTS_DRAGONFLY_L471QG/ONBOARD_SARA4_PPP.cpp renamed to connectivity/drivers/cellular/MultiTech/DragonflyNano/COMPONENT_MULTITECH_DRAGONFLY_NANO_CELLULAR/TARGET_MTS_DRAGONFLY_L471QG/ONBOARD_SARA4_PPP.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void ONBOARD_SARA4_PPP::onboard_modem_deinit()
111111
void ONBOARD_SARA4_PPP::onboard_modem_power_up()
112112
{
113113
// Make sure the radio is initialized so it can be powered on.
114-
if (!initialized){
114+
if (!initialized) {
115115
onboard_modem_init();
116116
}
117117

@@ -129,7 +129,7 @@ void ONBOARD_SARA4_PPP::onboard_modem_power_up()
129129
uint8_t retries = 5;
130130
do {
131131
// If it hasn't turned on after multiple tries, exit and return.
132-
if(0 == retries--) {
132+
if (0 == retries--) {
133133
return;
134134
}
135135
// Activate PWR_ON for 150ms-3.2s to switch on. Reference ublox SARA-R4 data sheet.
@@ -153,7 +153,7 @@ void ONBOARD_SARA4_PPP::onboard_modem_power_down()
153153
}
154154

155155
// Make sure the I/O are properly initialized.
156-
if (!initialized){
156+
if (!initialized) {
157157
onboard_modem_init();
158158
}
159159
// Activate PWR_ON for at least 1.5s to switch off. Reference ublox SARA-R4 data sheet.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(BC95)
5-
add_subdirectory(BG96)
6-
add_subdirectory(EC2X)
7-
add_subdirectory(M26)
8-
add_subdirectory(UG96)
4+
if("COMPONENT_QUECTEL_EC2X=1" IN_LIST MBED_TARGET_DEFINITIONS)
5+
add_subdirectory(COMPONENT_QUECTEL_EC2X)
6+
endif()
7+
8+
if("COMPONENT_QUECTEL_BG96=1" IN_LIST MBED_TARGET_DEFINITIONS OR ("COMPONENT_STMOD_CELLULAR=1" IN_LIST MBED_TARGET_DEFINITIONS AND "MBED_CONF_STMOD_CELLULAR_TYPE=STMOD_BG96"))
9+
add_subdirectory(COMPONENT_QUECTEL_BG96)
10+
endif()
11+
12+
if("COMPONENT_QUECTEL_UG96=1" IN_LIST MBED_TARGET_DEFINITIONS OR ("COMPONENT_STMOD_CELLULAR=1" IN_LIST MBED_TARGET_DEFINITIONS AND "MBED_CONF_STMOD_CELLULAR_TYPE=STMOD_UG96"))
13+
add_subdirectory(COMPONENT_QUECTEL_UG96)
14+
endif()
15+
16+
if("COMPONENT_QUECTEL_BC95=1" IN_LIST MBED_TARGET_DEFINITIONS)
17+
add_subdirectory(COMPONENT_QUECTEL_BC95)
18+
endif()
19+
20+
if("COMPONENT_QUECTEL_M26=1" IN_LIST MBED_TARGET_DEFINITIONS)
21+
add_subdirectory(COMPONENT_QUECTEL_M26)
22+
endif()
23+

connectivity/drivers/cellular/QUECTEL/BC95/CMakeLists.txt renamed to connectivity/drivers/cellular/QUECTEL/COMPONENT_QUECTEL_BC95/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ target_sources(mbed-cellular
1414
QUECTEL_BC95_CellularNetwork.cpp
1515
QUECTEL_BC95_CellularStack.cpp
1616
)
17+
18+
if("TARGET_ADV_WISE_1570" IN_LIST MBED_TARGET_LABELS)
19+
add_subdirectory(TARGET_ADV_WISE_1570)
20+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_include_directories(mbed-cellular
5+
PUBLIC
6+
.
7+
)
8+
9+
target_sources(mbed-cellular
10+
PRIVATE
11+
ONBOARD_QUECTEL_BC95.cpp
12+
)

connectivity/drivers/cellular/QUECTEL/BG96/CMakeLists.txt renamed to connectivity/drivers/cellular/QUECTEL/COMPONENT_QUECTEL_BG96/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ target_sources(mbed-cellular
1515
QUECTEL_BG96_CellularStack.cpp
1616
QUECTEL_BG96_ControlPlane_netif.cpp
1717
)
18+
19+
if("TARGET_WIO_BG96" IN_LIST MBED_TARGET_LABELS)
20+
add_subdirectory(TARGET_WIO_BG96)
21+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_include_directories(mbed-cellular
5+
PUBLIC
6+
.
7+
)
8+
9+
target_sources(mbed-cellular
10+
PRIVATE
11+
ONBOARD_QUECTEL_BG96.cpp
12+
)

connectivity/drivers/cellular/QUECTEL/EC2X/CMakeLists.txt renamed to connectivity/drivers/cellular/QUECTEL/COMPONENT_QUECTEL_EC2X/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ target_sources(mbed-cellular
1010
PRIVATE
1111
QUECTEL_EC2X.cpp
1212
)
13+
14+
if("MTS_DRAGONFLY_L496VG" IN_LIST MBED_TARGET_LABELS)
15+
add_subdirectory(TARGET_MTS_DRAGONFLY_L496VG)
16+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_include_directories(mbed-cellular
5+
PUBLIC
6+
.
7+
)
8+
9+
target_sources(mbed-cellular
10+
PRIVATE
11+
ONBOARD_QUECTEL_EG25.cpp
12+
)

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_MTS_DRAGONFLY_L496VG/ONBOARD_QUECTEL_EG25.cpp renamed to connectivity/drivers/cellular/QUECTEL/COMPONENT_QUECTEL_EC2X/TARGET_MTS_DRAGONFLY_L496VG/ONBOARD_QUECTEL_EG25.cpp

+7-9
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ void ONBOARD_QUECTEL_EG25::onboard_modem_power_up()
127127
{
128128
// NET_STATUS = input. InterruptIn make LS LED follow.
129129
// LS_LED = output. Follow NET_STATUS.
130-
net_status->rise(callback(this,&ONBOARD_QUECTEL_EG25::link_status));
131-
net_status->fall(callback(this,&ONBOARD_QUECTEL_EG25::link_status));
130+
net_status->rise(callback(this, &ONBOARD_QUECTEL_EG25::link_status));
131+
net_status->fall(callback(this, &ONBOARD_QUECTEL_EG25::link_status));
132132

133133
// Make sure the radio is initialized so it can be powered on.
134-
if (!initialized){
134+
if (!initialized) {
135135
onboard_modem_init();
136136
}
137137

@@ -152,7 +152,7 @@ void ONBOARD_QUECTEL_EG25::onboard_modem_power_up()
152152
do {
153153
thread_sleep_for(1000);
154154
radio_off = gpio_read(&status);
155-
if(!timeout--){
155+
if (!timeout--) {
156156
press_power_button(550000);
157157
timeout = 10;
158158
}
@@ -186,7 +186,7 @@ void ONBOARD_QUECTEL_EG25::onboard_modem_power_down()
186186
}
187187

188188
// Make sure the I/O are properly initialized.
189-
if (!initialized){
189+
if (!initialized) {
190190
onboard_modem_init();
191191
}
192192

@@ -202,12 +202,10 @@ void ONBOARD_QUECTEL_EG25::onboard_modem_power_down()
202202

203203
if (radio_off) {
204204
break;
205-
}
206-
else {
205+
} else {
207206
onboard_modem_reset();
208207
}
209-
}
210-
while (!radio_off);
208+
} while (!radio_off);
211209
}
212210

213211
void ONBOARD_QUECTEL_EG25::onboard_modem_reset()

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_MTS_DRAGONFLY_L496VG/ONBOARD_QUECTEL_EG25.h renamed to connectivity/drivers/cellular/QUECTEL/COMPONENT_QUECTEL_EC2X/TARGET_MTS_DRAGONFLY_L496VG/ONBOARD_QUECTEL_EG25.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class ONBOARD_QUECTEL_EG25 : public QUECTEL_EC2X {
3333

3434
private:
3535
uint8_t initialized;
36-
DigitalOut* ls;
37-
InterruptIn* net_status;
36+
DigitalOut *ls;
37+
InterruptIn *net_status;
3838
void link_status();
3939
void press_power_button(int time_ms);
4040
void onboard_modem_init();

connectivity/drivers/cellular/QUECTEL/UG96/CMakeLists.txt renamed to connectivity/drivers/cellular/QUECTEL/COMPONENT_QUECTEL_UG96/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ target_sources(mbed-cellular
1111
QUECTEL_UG96.cpp
1212
QUECTEL_UG96_CellularContext.cpp
1313
)
14+
15+
if("TARGET_WIO_3G" IN_LIST MBED_TARGET_LABELS)
16+
add_subdirectory(TARGET_WIO_3G)
17+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_include_directories(mbed-cellular
5+
PUBLIC
6+
.
7+
)
8+
9+
target_sources(mbed-cellular
10+
PRIVATE
11+
ONBOARD_QUECTEL_UG96.cpp
12+
)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(AT)
4+
# Note that the RM1000 chip appears to be unbuyable and the RIOT_MICRO_MODULE target that used it was
5+
# already removed from Mbed in Mbed 6.0.0. This would make it a candidate for removal.
6+
if("COMPONENT_RIOTMICRO_RM1000=1" IN_LIST MBED_TARGET_DEFINITIONS)
7+
add_subdirectory(COMPONENT_RIOTMICRO_RM1000)
8+
endif()
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(HE910)
5-
add_subdirectory(ME310)
6-
add_subdirectory(ME910)
4+
if("COMPONENT_TELIT_HE910=1" IN_LIST MBED_TARGET_DEFINITIONS)
5+
add_subdirectory(COMPONENT_TELIT_HE910)
6+
endif()
7+
8+
if("COMPONENT_TELIT_ME310=1" IN_LIST MBED_TARGET_DEFINITIONS)
9+
add_subdirectory(COMPONENT_TELIT_ME310)
10+
endif()
11+
12+
if("COMPONENT_TELIT_ME910=1" IN_LIST MBED_TARGET_DEFINITIONS)
13+
add_subdirectory(COMPONENT_TELIT_ME910)
14+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2024 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_include_directories(mbed-cellular
5+
PUBLIC
6+
.
7+
)
8+
9+
target_sources(mbed-cellular
10+
PRIVATE
11+
TELIT_HE910.cpp
12+
)
13+
14+
if("TARGET_MTS_DRAGONFLY_F411RE" IN_LIST MBED_TARGET_LABELS)
15+
add_subdirectory(TARGET_MTS_DRAGONFLY_F411RE)
16+
endif()
17+
18+
if("TARGET_MTS_DRAGONFLY_F413RH" IN_LIST MBED_TARGET_LABELS)
19+
add_subdirectory(TARGET_MTS_DRAGONFLY_F413RH)
20+
endif()

0 commit comments

Comments
 (0)