mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14280 from hugueskamba/hk_cmake_refactor_wiced
CMake: Refactor WIO_EMW3166 supportpull/14286/head
commit
34627b7d53
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_subdirectory(TARGET_WICED EXCLUDE_FROM_ALL)
|
||||
|
||||
add_subdirectory(esp8266-driver)
|
||||
|
||||
target_link_libraries(mbed-wifi
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_library(mbed-wiced INTERFACE)
|
||||
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||
set(LIB_WICED_DRIVERS TOOLCHAIN_ARMC6/TARGET_WIO_EMW3166/libwiced_drivers.ar)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||
set(LIB_WICED_DRIVERS TOOLCHAIN_GCC_ARM/TARGET_WIO_EMW3166/libwiced_drivers.a)
|
||||
endif()
|
||||
|
||||
target_link_libraries(mbed-wiced INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/${LIB_WICED_DRIVERS})
|
||||
|
||||
target_include_directories(mbed-wiced
|
||||
INTERFACE
|
||||
wiced_interface
|
||||
)
|
||||
|
||||
target_sources(mbed-wiced
|
||||
INTERFACE
|
||||
wiced_interface/default_wifi_interface.cpp
|
||||
)
|
|
@ -29,13 +29,12 @@
|
|||
/** WicedInterface class
|
||||
* Implementation of the NetworkStack for the Wiced
|
||||
*/
|
||||
class WicedInterface : public WiFiInterface, public EMACInterface
|
||||
{
|
||||
class WicedInterface : public WiFiInterface, public EMACInterface {
|
||||
public:
|
||||
|
||||
WicedInterface(
|
||||
EMAC &emac = WICED_EMAC::get_instance(),
|
||||
OnboardNetworkStack &stack = OnboardNetworkStack::get_default_instance());
|
||||
EMAC &emac = WICED_EMAC::get_instance(),
|
||||
OnboardNetworkStack &stack = OnboardNetworkStack::get_default_instance());
|
||||
|
||||
/** Start the interface
|
||||
*
|
||||
|
@ -80,7 +79,8 @@ public:
|
|||
* @param channel Channel on which the connection is to be made, or 0 for any (Default: 0)
|
||||
* @return Not supported, returns NSAPI_ERROR_UNSUPPORTED
|
||||
*/
|
||||
nsapi_error_t set_channel(uint8_t channel) {
|
||||
nsapi_error_t set_channel(uint8_t channel)
|
||||
{
|
||||
if (channel != 0) {
|
||||
return NSAPI_ERROR_UNSUPPORTED;
|
||||
}
|
|
@ -154,7 +154,6 @@ public:
|
|||
emac_link_input_cb_t emac_link_input_cb; /**< Callback for incoming data */
|
||||
emac_link_state_change_cb_t emac_link_state_cb;
|
||||
EMACMemoryManager *memory_manager;
|
||||
|
||||
};
|
||||
|
||||
#endif /* WICED_EMAC_H_ */
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
include(../tools/cmake/set_linker_script.cmake)
|
||||
|
||||
|
@ -34,6 +34,4 @@ elseif("STM" IN_LIST MBED_TARGET_LABELS)
|
|||
add_subdirectory(TARGET_STM)
|
||||
elseif("TOSHIBA" IN_LIST MBED_TARGET_LABELS)
|
||||
add_subdirectory(TARGET_TOSHIBA)
|
||||
elseif("WICED" IN_LIST MBED_TARGET_LABELS)
|
||||
add_subdirectory(TARGET_WICED)
|
||||
endif()
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_library(WIO_EMW3166 INTERFACE)
|
||||
add_library(mbed-wio-emw3166 INTERFACE)
|
||||
|
||||
target_sources(WIO_EMW3166
|
||||
target_sources(mbed-wio-emw3166
|
||||
INTERFACE
|
||||
PeripheralPins.c
|
||||
)
|
||||
|
||||
target_include_directories(WIO_EMW3166
|
||||
target_include_directories(mbed-wio-emw3166
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_link_libraries(WIO_EMW3166 INTERFACE STM32F412xG)
|
||||
target_link_libraries(mbed-wio-emw3166 INTERFACE mbed-wiced mbed-stm32f412xg)
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if("WIO_EMW3166" IN_LIST MBED_TARGET_LABELS)
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||
set(LIB_WICED_DRIVERS TOOLCHAIN_ARMC6/TARGET_WIO_EMW3166/libwiced_drivers.ar)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||
set(LIB_WICED_DRIVERS TOOLCHAIN_GCC_ARM/TARGET_WIO_EMW3166/libwiced_drivers.a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(mbed-core INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/${LIB_WICED_DRIVERS})
|
||||
|
||||
target_include_directories(mbed-core
|
||||
INTERFACE
|
||||
wiced_interface
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
INTERFACE
|
||||
wiced_interface/default_wifi_interface.cpp
|
||||
)
|
|
@ -34,7 +34,6 @@ The following targets are supported:
|
|||
- Silicon Labs targets
|
||||
- STM targets
|
||||
- Toshiba targets
|
||||
- WICED targets
|
||||
|
||||
The post build operations is only supported for the following Mbed boards:
|
||||
LPC1114, LPC1768, ARCH_PRO, LPC54114,
|
||||
|
|
Loading…
Reference in New Issue