Skip to content

Commit 36dda1c

Browse files
authored
Fix some hardware_library dependencies (#383)
1 parent e57b99a commit 36dda1c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
pico_simple_hardware_target(clocks)
22

33
target_link_libraries(hardware_clocks INTERFACE
4+
hardware_gpio
5+
hardware_irq
46
hardware_resets
5-
hardware_watchdog
6-
hardware_xosc
77
hardware_pll
88
# not currently used by clocks.c, but sensibly bundled here
99
# as changing frequencies may require upping voltage
1010
hardware_vreg
11+
hardware_watchdog
12+
hardware_xosc
1113
)

src/rp2_common/hardware_gpio/gpio.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
#include "hardware/structs/iobank0.h"
1111
#include "hardware/irq.h"
1212

13+
#if LIB_PICO_BINARY_INFO
1314
#include "pico/binary_info.h"
15+
#endif
1416

1517
static gpio_irq_callback_t _callbacks[NUM_CORES];
1618

@@ -141,7 +143,9 @@ void gpio_acknowledge_irq(uint gpio, uint32_t events) {
141143
void gpio_debug_pins_init() {
142144
gpio_init_mask(DEBUG_PIN_MASK);
143145
gpio_set_dir_masked(DEBUG_PIN_MASK, DEBUG_PIN_MASK);
146+
#if LIB_PICO_BINARY_INFO
144147
bi_decl_if_func_used(bi_pin_mask_with_names(DEBUG_PIN_MASK, "Debug"));
148+
#endif
145149
}
146150

147151
void gpio_set_input_enabled(uint gpio, bool enabled) {

0 commit comments

Comments
 (0)