Skip to content

Commit

Permalink
Begin documenting Mbed OS target features and components (#240)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
multiplemonomials authored Feb 9, 2024
1 parent d1b0cca commit f19273a
Show file tree
Hide file tree
Showing 228 changed files with 732 additions and 2,876 deletions.
41 changes: 31 additions & 10 deletions connectivity/drivers/802.15.4_RF/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

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

# Nanostack drivers always require Mbed RTOS
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags)

target_link_libraries(mbed-nanostack
INTERFACE
mbed-802.15.4-rf
)
endif()
endmacro()

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

if("Freescale" IN_LIST MBED_TARGET_LABELS)
create_802_15_4_target()
add_subdirectory(TARGET_Freescale)
add_subdirectory(mcr20a-rf-driver)
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
create_802_15_4_target()
add_subdirectory(TARGET_Silicon_Labs)
elseif("STM" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(stm-s2lp-rf-driver)
endif()

add_subdirectory(atmel-rf-driver)
if("COMPONENT_MICROCHIP_AT86RF=1" IN_LIST MBED_TARGET_DEFINITIONS)
create_802_15_4_target()
add_subdirectory(COMPONENT_MICROCHIP_AT86RF)
endif()

if("COMPONENT_NXP_MCR20A=1" IN_LIST MBED_TARGET_DEFINITIONS)
create_802_15_4_target()
add_subdirectory(COMPONENT_NXP_MCR20A)
endif()

if("COMPONENT_STM_S2_LP=1" IN_LIST MBED_TARGET_DEFINITIONS)
create_802_15_4_target()
add_subdirectory(COMPONENT_STM_S2_LP)
endif()


target_link_libraries(mbed-nanostack
INTERFACE
mbed-802.15.4-rf
)
4 changes: 3 additions & 1 deletion connectivity/drivers/cellular/Altair/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(ALT1250)
if("COMPONENT_ALTAIR_ALT1250=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_ALTAIR_ALT1250)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 2 additions & 8 deletions connectivity/drivers/cellular/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("STMOD_CELLULAR" IN_LIST MBED_TARGET_LABELS)
if("COMPONENT_STMOD_CELLULAR=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_STMOD_CELLULAR)
endif()

Expand All @@ -11,10 +11,4 @@ add_subdirectory(GENERIC)
add_subdirectory(MultiTech)
add_subdirectory(QUECTEL)
add_subdirectory(RiotMicro)
add_subdirectory(TELIT)
add_subdirectory(UBLOX)

target_include_directories(mbed-cellular
PUBLIC
.
)
add_subdirectory(TELIT)
4 changes: 3 additions & 1 deletion connectivity/drivers/cellular/GEMALTO/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(CINTERION)
if("COMPONENT_GEMALTO_CINTERION=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(CINTERION)
endif()
4 changes: 3 additions & 1 deletion connectivity/drivers/cellular/GENERIC/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(GENERIC_AT3GPP)
if("COMPONENT_GENERIC_AT3GPP=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_GENERIC_AT3GPP)
endif()
4 changes: 3 additions & 1 deletion connectivity/drivers/cellular/MultiTech/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(DragonflyNano)
if("COMPONENT_MULTITECH_DRAGONFLY_NANO_CELLULAR=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_MULTITECH_DRAGONFLY_NANO_CELLULAR)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ target_sources(mbed-cellular
SARA4_PPP.cpp
SARA4_PPP_CellularNetwork.cpp
)

if("MTS_DRAGONFLY_L471QG" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_MTS_DRAGONFLY_L471QG)
endif()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# Copyright (c) 2024 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

target_include_directories(mbed-cellular
Expand All @@ -8,5 +8,5 @@ target_include_directories(mbed-cellular

target_sources(mbed-cellular
PRIVATE
TELIT_HE910.cpp
)
ONBOARD_SARA4_PPP.cpp
)
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void ONBOARD_SARA4_PPP::onboard_modem_deinit()
void ONBOARD_SARA4_PPP::onboard_modem_power_up()
{
// Make sure the radio is initialized so it can be powered on.
if (!initialized){
if (!initialized) {
onboard_modem_init();
}

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

// Make sure the I/O are properly initialized.
if (!initialized){
if (!initialized) {
onboard_modem_init();
}
// Activate PWR_ON for at least 1.5s to switch off. Reference ublox SARA-R4 data sheet.
Expand Down
25 changes: 20 additions & 5 deletions connectivity/drivers/cellular/QUECTEL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(BC95)
add_subdirectory(BG96)
add_subdirectory(EC2X)
add_subdirectory(M26)
add_subdirectory(UG96)
if("COMPONENT_QUECTEL_EC2X=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_QUECTEL_EC2X)
endif()

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"))
add_subdirectory(COMPONENT_QUECTEL_BG96)
endif()

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"))
add_subdirectory(COMPONENT_QUECTEL_UG96)
endif()

if("COMPONENT_QUECTEL_BC95=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_QUECTEL_BC95)
endif()

if("COMPONENT_QUECTEL_M26=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_QUECTEL_M26)
endif()

Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ target_sources(mbed-cellular
QUECTEL_BC95_CellularNetwork.cpp
QUECTEL_BC95_CellularStack.cpp
)

if("TARGET_ADV_WISE_1570" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_ADV_WISE_1570)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2024 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

target_include_directories(mbed-cellular
PUBLIC
.
)

target_sources(mbed-cellular
PRIVATE
ONBOARD_QUECTEL_BC95.cpp
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ target_sources(mbed-cellular
QUECTEL_BG96_CellularStack.cpp
QUECTEL_BG96_ControlPlane_netif.cpp
)

if("TARGET_WIO_BG96" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_WIO_BG96)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2024 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

target_include_directories(mbed-cellular
PUBLIC
.
)

target_sources(mbed-cellular
PRIVATE
ONBOARD_QUECTEL_BG96.cpp
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ target_sources(mbed-cellular
PRIVATE
QUECTEL_EC2X.cpp
)

if("MTS_DRAGONFLY_L496VG" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_MTS_DRAGONFLY_L496VG)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2024 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

target_include_directories(mbed-cellular
PUBLIC
.
)

target_sources(mbed-cellular
PRIVATE
ONBOARD_QUECTEL_EG25.cpp
)
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ void ONBOARD_QUECTEL_EG25::onboard_modem_power_up()
{
// NET_STATUS = input. InterruptIn make LS LED follow.
// LS_LED = output. Follow NET_STATUS.
net_status->rise(callback(this,&ONBOARD_QUECTEL_EG25::link_status));
net_status->fall(callback(this,&ONBOARD_QUECTEL_EG25::link_status));
net_status->rise(callback(this, &ONBOARD_QUECTEL_EG25::link_status));
net_status->fall(callback(this, &ONBOARD_QUECTEL_EG25::link_status));

// Make sure the radio is initialized so it can be powered on.
if (!initialized){
if (!initialized) {
onboard_modem_init();
}

Expand All @@ -152,7 +152,7 @@ void ONBOARD_QUECTEL_EG25::onboard_modem_power_up()
do {
thread_sleep_for(1000);
radio_off = gpio_read(&status);
if(!timeout--){
if (!timeout--) {
press_power_button(550000);
timeout = 10;
}
Expand Down Expand Up @@ -186,7 +186,7 @@ void ONBOARD_QUECTEL_EG25::onboard_modem_power_down()
}

// Make sure the I/O are properly initialized.
if (!initialized){
if (!initialized) {
onboard_modem_init();
}

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

if (radio_off) {
break;
}
else {
} else {
onboard_modem_reset();
}
}
while (!radio_off);
} while (!radio_off);
}

void ONBOARD_QUECTEL_EG25::onboard_modem_reset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class ONBOARD_QUECTEL_EG25 : public QUECTEL_EC2X {

private:
uint8_t initialized;
DigitalOut* ls;
InterruptIn* net_status;
DigitalOut *ls;
InterruptIn *net_status;
void link_status();
void press_power_button(int time_ms);
void onboard_modem_init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ target_sources(mbed-cellular
QUECTEL_UG96.cpp
QUECTEL_UG96_CellularContext.cpp
)

if("TARGET_WIO_3G" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_WIO_3G)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2024 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

target_include_directories(mbed-cellular
PUBLIC
.
)

target_sources(mbed-cellular
PRIVATE
ONBOARD_QUECTEL_UG96.cpp
)
6 changes: 5 additions & 1 deletion connectivity/drivers/cellular/RiotMicro/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(AT)
# Note that the RM1000 chip appears to be unbuyable and the RIOT_MICRO_MODULE target that used it was
# already removed from Mbed in Mbed 6.0.0. This would make it a candidate for removal.
if("COMPONENT_RIOTMICRO_RM1000=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_RIOTMICRO_RM1000)
endif()
14 changes: 11 additions & 3 deletions connectivity/drivers/cellular/TELIT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(HE910)
add_subdirectory(ME310)
add_subdirectory(ME910)
if("COMPONENT_TELIT_HE910=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_TELIT_HE910)
endif()

if("COMPONENT_TELIT_ME310=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_TELIT_ME310)
endif()

if("COMPONENT_TELIT_ME910=1" IN_LIST MBED_TARGET_DEFINITIONS)
add_subdirectory(COMPONENT_TELIT_ME910)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2024 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

target_include_directories(mbed-cellular
PUBLIC
.
)

target_sources(mbed-cellular
PRIVATE
TELIT_HE910.cpp
)

if("TARGET_MTS_DRAGONFLY_F411RE" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_MTS_DRAGONFLY_F411RE)
endif()

if("TARGET_MTS_DRAGONFLY_F413RH" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_MTS_DRAGONFLY_F413RH)
endif()
Loading

0 comments on commit f19273a

Please sign in to comment.