File tree 12 files changed +52
-28
lines changed
12 files changed +52
-28
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,7 @@ function(add_subdirectory_exclude_platforms NAME)
43
43
endfunction ()
44
44
45
45
# Add blink example
46
- if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch)
47
- message ("Wi-Fi driver is not available" )
48
- else ()
49
- add_subdirectory_exclude_platforms(blink)
50
- endif ()
46
+ add_subdirectory_exclude_platforms(blink)
51
47
add_subdirectory_exclude_platforms(blink_simple)
52
48
53
49
# Add hello world example
Original file line number Diff line number Diff line change @@ -5,11 +5,7 @@ if (TARGET hardware_adc)
5
5
add_subdirectory_exclude_platforms(joystick_display)
6
6
add_subdirectory_exclude_platforms(onboard_temperature)
7
7
add_subdirectory_exclude_platforms(microphone_adc)
8
- if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch)
9
- message ("Skipping read_vsys for Pico W as support is not available" )
10
- else ()
11
- add_subdirectory_exclude_platforms(read_vsys)
12
- endif ()
8
+ add_subdirectory_exclude_platforms(read_vsys)
13
9
else ()
14
10
message ("Skipping ADC examples as hardware_adc is unavailable on this platform" )
15
11
endif ()
Original file line number Diff line number Diff line change
1
+ if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch)
2
+ message ("Skipping read_vsys as Wi-Fi driver is not available" )
3
+ return ()
4
+ endif ()
5
+
1
6
add_library (power_status_adc INTERFACE )
2
7
target_sources (power_status_adc INTERFACE
3
8
${CMAKE_CURRENT_LIST_DIR} /power_status.c
Original file line number Diff line number Diff line change
1
+ if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch)
2
+ return ()
3
+ endif ()
1
4
if (NOT PICO_CYW43_SUPPORTED)
2
5
message ("Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set" )
3
6
endif ()
Original file line number Diff line number Diff line change
1
+ if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch)
2
+ message ("Skipping blink examples as Wi-Fi driver is not available" )
3
+ return ()
4
+ endif ()
5
+
1
6
add_executable (blink
2
7
blink.c
3
8
)
Original file line number Diff line number Diff line change @@ -11,10 +11,16 @@ target_link_libraries(${TARGET_NAME} PRIVATE
11
11
pico_stdlib
12
12
)
13
13
if (PICO_CYW43_SUPPORTED)
14
- # For led support on pico_w
15
- target_link_libraries (${TARGET_NAME} PRIVATE
16
- pico_cyw43_arch_none
17
- )
14
+ if (TARGET pico_cyw43_arch)
15
+ # For led support on Wi-Fi boards
16
+ target_link_libraries (${TARGET_NAME} PRIVATE
17
+ pico_cyw43_arch_none
18
+ )
19
+ else ()
20
+ target_compile_definitions (${TARGET_NAME} PRIVATE
21
+ USE_LED=0
22
+ )
23
+ endif ()
18
24
endif ()
19
25
target_compile_definitions (${TARGET_NAME} PRIVATE
20
26
configNUMBER_OF_CORES=1
@@ -34,9 +40,15 @@ target_link_libraries(${TARGET_NAME} PRIVATE
34
40
pico_stdlib
35
41
)
36
42
if (PICO_CYW43_SUPPORTED)
37
- # For led support on pico_w
38
- target_link_libraries (${TARGET_NAME} PRIVATE
39
- pico_cyw43_arch_none
40
- )
43
+ if (TARGET pico_cyw43_arch)
44
+ # For led support on Wi-Fi boards
45
+ target_link_libraries (${TARGET_NAME} PRIVATE
46
+ pico_cyw43_arch_none
47
+ )
48
+ else ()
49
+ target_compile_definitions (${TARGET_NAME} PRIVATE
50
+ USE_LED=0
51
+ )
52
+ endif ()
41
53
endif ()
42
54
pico_add_extra_outputs(${TARGET_NAME} )
Original file line number Diff line number Diff line change 9
9
#include "pico/stdlib.h"
10
10
#include "pico/multicore.h"
11
11
12
+ // Whether to flash the led
13
+ #ifndef USE_LED
14
+ #define USE_LED 1
15
+ #endif
16
+
17
+ #if USE_LED
12
18
#ifdef CYW43_WL_GPIO_LED_PIN
13
19
#include "pico/cyw43_arch.h"
14
20
#endif
21
+ #endif
15
22
16
23
#include "FreeRTOS.h"
17
24
#include "task.h"
21
28
#define RUN_FREE_RTOS_ON_CORE 0
22
29
#endif
23
30
24
- // Whether to flash the led
25
- #ifndef USE_LED
26
- #define USE_LED 1
27
- #endif
28
31
29
32
// Whether to busy wait in the led thread
30
33
#ifndef LED_BUSY_WAIT
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)
2
2
3
3
if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w
4
4
if (NOT TARGET pico_cyw43_arch)
5
- message ("Skipping Pico W examples as support is not available" )
5
+ message ("Skipping Wi-Fi examples as support is not available" )
6
6
else ()
7
7
8
8
if (DEFINED ENV{WIFI_SSID} AND (NOT WIFI_SSID))
@@ -20,7 +20,7 @@ if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w
20
20
21
21
add_subdirectory (wifi)
22
22
if (NOT TARGET pico_btstack_base)
23
- message ("Skipping Pico W Bluetooth examples as support is not available" )
23
+ message ("Skipping Bluetooth examples as support is not available" )
24
24
else ()
25
25
add_subdirectory (bt)
26
26
endif ()
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ set(BTSTACK_3RD_PARTY_PATH ${BTSTACK_ROOT}/3rd-party)
6
6
set (BT_EXAMPLE_COMMON_DIR "${CMAKE_CURRENT_LIST_DIR} " )
7
7
8
8
if (NOT PICO_EXTRAS_PATH)
9
- message ("Skipping some Pico W BTstack examples that require pico-extras" )
9
+ message ("Skipping some BTstack examples that require pico-extras" )
10
10
else ()
11
11
add_library (pico_btstack_audio_example INTERFACE )
12
12
target_sources (pico_btstack_audio_example INTERFACE
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ add_subdirectory_exclude_platforms(wifi_scan)
6
6
add_subdirectory_exclude_platforms(access_point)
7
7
8
8
if ("${WIFI_SSID} " STREQUAL "" )
9
- message ("Skipping some Pico W examples as WIFI_SSID is not defined" )
9
+ message ("Skipping some Wi-Fi examples as WIFI_SSID is not defined" )
10
10
elseif ("${WIFI_PASSWORD} " STREQUAL "" )
11
- message ("Skipping some Pico W examples as WIFI_PASSWORD is not defined" )
11
+ message ("Skipping some Wi-Fi examples as WIFI_PASSWORD is not defined" )
12
12
else ()
13
13
add_subdirectory_exclude_platforms(freertos)
14
14
add_subdirectory_exclude_platforms(httpd)
Original file line number Diff line number Diff line change
1
+ if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch)
2
+ return ()
3
+ endif ()
4
+
1
5
add_executable (picow_blink
2
6
picow_blink.c
3
7
)
Original file line number Diff line number Diff line change 1
1
if (NOT FREERTOS_KERNEL_PATH AND NOT DEFINED ENV{FREERTOS_KERNEL_PATH})
2
- message ("Skipping Pico W FreeRTOS examples as FREERTOS_KERNEL_PATH not defined" )
2
+ message ("Skipping Wi-Fi FreeRTOS examples as FREERTOS_KERNEL_PATH not defined" )
3
3
else ()
4
4
include (FreeRTOS_Kernel_import.cmake)
5
5
You can’t perform that action at this time.
0 commit comments