File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 1
- if (NOT PICO_NO_HARDWARE )
2
- add_subdirectory (usb )
3
- add_subdirectory (serial )
4
- endif ()
1
+ add_subdirectory (serial )
2
+ add_subdirectory (usb )
Original file line number Diff line number Diff line change 1
- add_executable (hello_usb
2
- hello_usb.c
3
- )
1
+ if (TARGET tinyusb_device )
2
+ add_executable (hello_usb
3
+ hello_usb.c
4
+ )
4
5
5
- # Pull in our pico_stdlib which aggregates commonly used features
6
- target_link_libraries (hello_usb pico_stdlib )
6
+ # Pull in our pico_stdlib which aggregates commonly used features
7
+ target_link_libraries (hello_usb pico_stdlib )
7
8
8
- # enable usb output, disable uart output
9
- pico_enable_stdio_usb (hello_usb 1 )
10
- pico_enable_stdio_uart (hello_usb 0 )
9
+ # enable usb output, disable uart output
10
+ pico_enable_stdio_usb (hello_usb 1 )
11
+ pico_enable_stdio_uart (hello_usb 0 )
11
12
12
- # create map/bin/hex/uf2 file etc.
13
- pico_add_extra_outputs (hello_usb )
13
+ # create map/bin/hex/uf2 file etc.
14
+ pico_add_extra_outputs (hello_usb )
14
15
15
- # add url via pico_set_program_url
16
- example_auto_set_url (hello_usb )
16
+ # add url via pico_set_program_url
17
+ example_auto_set_url (hello_usb )
18
+ elseif (PICO_ON_DEVICE )
19
+ message (WARNING "not building hello_usb because TinyUSB submodule is not initialized in the SDK" )
20
+ endif ()
You can’t perform that action at this time.
0 commit comments