Skip to content

Commit fa774d1

Browse files
committed
Allow CYW43 to be configured with cmake
1 parent d1a779c commit fa774d1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/rp2_common/pico_cyw43_driver/CMakeLists.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,34 @@ if (EXISTS ${PICO_CYW43_DRIVER_PATH}/${CYW43_DRIVER_TEST_FILE})
5656
hardware_exception
5757
)
5858

59+
if (CYW43_DEFAULT_PIN_WL_REG_ON)
60+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_DEFAULT_PIN_WL_REG_ON=${CYW43_DEFAULT_PIN_WL_REG_ON})
61+
endif()
62+
if (CYW43_DEFAULT_PIN_WL_DATA_OUT)
63+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_DEFAULT_PIN_WL_DATA_OUT=${CYW43_DEFAULT_PIN_WL_DATA_OUT})
64+
endif()
65+
if (CYW43_DEFAULT_PIN_WL_DATA_IN)
66+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_DEFAULT_PIN_WL_DATA_IN=${CYW43_DEFAULT_PIN_WL_DATA_IN})
67+
endif()
68+
if (CYW43_DEFAULT_PIN_WL_HOST_WAKE)
69+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_DEFAULT_PIN_WL_HOST_WAKE=${CYW43_DEFAULT_PIN_WL_HOST_WAKE})
70+
endif()
71+
if (CYW43_DEFAULT_PIN_WL_CLOCK)
72+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_DEFAULT_PIN_WL_CLOCK=${CYW43_DEFAULT_PIN_WL_CLOCK})
73+
endif()
74+
if (CYW43_DEFAULT_PIN_WL_CS)
75+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_DEFAULT_PIN_WL_CS=${CYW43_DEFAULT_PIN_WL_CS})
76+
endif()
77+
if (CYW43_PIO_CLOCK_DIV_INT)
78+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_PIO_CLOCK_DIV_INT=${CYW43_PIO_CLOCK_DIV_INT})
79+
endif()
80+
if (CYW43_PIO_CLOCK_DIV_FRAC)
81+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_PIO_CLOCK_DIV_FRAC=${CYW43_PIO_CLOCK_DIV_FRAC})
82+
endif()
83+
if (CYW43_PIO_CLOCK_DIV_DYNAMIC)
84+
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_PIO_CLOCK_DIV_DYNAMIC=${CYW43_PIO_CLOCK_DIV_DYNAMIC})
85+
endif()
86+
5987
# Note: This is used by MP, so check for issues when making changes
6088
# e.g. Don't add new depenedences
6189
pico_add_library(pico_btstack_hci_transport_cyw43 NOFLAG)

0 commit comments

Comments
 (0)