File tree Expand file tree Collapse file tree 12 files changed +52
-28
lines changed Expand file tree Collapse file tree 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)
4343endfunction ()
4444
4545# 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)
5147add_subdirectory_exclude_platforms(blink_simple)
5248
5349# Add hello world example 
Original file line number Diff line number Diff line change @@ -5,11 +5,7 @@ if (TARGET hardware_adc)
55    add_subdirectory_exclude_platforms(joystick_display)
66    add_subdirectory_exclude_platforms(onboard_temperature)
77    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)
139else ()
1410    message ("Skipping ADC examples as hardware_adc is unavailable on this platform" )
1511endif ()
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+ 
16add_library (power_status_adc INTERFACE )
27target_sources (power_status_adc INTERFACE 
38        ${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 ()
14if  (NOT  PICO_CYW43_SUPPORTED)
25    message ("Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set" )
36endif ()
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+ 
16add_executable (blink
27    blink.c
38    )
Original file line number Diff line number Diff line change @@ -11,10 +11,16 @@ target_link_libraries(${TARGET_NAME} PRIVATE
1111    pico_stdlib
1212    )
1313if (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 ()
1824endif ()
1925target_compile_definitions (${TARGET_NAME}  PRIVATE 
2026    configNUMBER_OF_CORES=1
@@ -34,9 +40,15 @@ target_link_libraries(${TARGET_NAME} PRIVATE
3440    pico_stdlib
3541    )
3642if (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 ()
4153endif ()
4254pico_add_extra_outputs(${TARGET_NAME} )
Original file line number Diff line number Diff line change 99#include  "pico/stdlib.h" 
1010#include  "pico/multicore.h" 
1111
12+ // Whether to flash the led 
13+ #ifndef  USE_LED 
14+ #define  USE_LED  1
15+ #endif 
16+ 
17+ #if  USE_LED 
1218#ifdef  CYW43_WL_GPIO_LED_PIN 
1319#include  "pico/cyw43_arch.h" 
1420#endif 
21+ #endif 
1522
1623#include  "FreeRTOS.h" 
1724#include  "task.h" 
2128#define  RUN_FREE_RTOS_ON_CORE  0
2229#endif 
2330
24- // Whether to flash the led 
25- #ifndef  USE_LED 
26- #define  USE_LED  1
27- #endif 
2831
2932// Whether to busy wait in the led thread 
3033#ifndef  LED_BUSY_WAIT 
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)
22
33if  (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w 
44    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" )
66    else ()
77
88        if  (DEFINED  ENV{WIFI_SSID} AND  (NOT  WIFI_SSID))
@@ -20,7 +20,7 @@ if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w
2020
2121        add_subdirectory (wifi)
2222        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" )
2424        else ()
2525            add_subdirectory (bt)
2626        endif ()
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ set(BTSTACK_3RD_PARTY_PATH ${BTSTACK_ROOT}/3rd-party)
66set (BT_EXAMPLE_COMMON_DIR "${CMAKE_CURRENT_LIST_DIR} " )
77
88if  (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" )
1010else ()
1111        add_library (pico_btstack_audio_example INTERFACE )
1212        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)
66add_subdirectory_exclude_platforms(access_point)
77
88if  ("${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" )
1010elseif  ("${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" )
1212else ()
1313    add_subdirectory_exclude_platforms(freertos)
1414    add_subdirectory_exclude_platforms(httpd)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments