From e4d6ff9ecdb96a9c8922c20ff8e77c019e93ca5b Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Thu, 28 Oct 2021 15:16:36 -0500 Subject: [PATCH] Small PICO_PLATFORM=host fixes (#639) --- src/host/hardware_gpio/include/hardware/gpio.h | 2 ++ src/host/pico_platform/include/pico/platform.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/host/hardware_gpio/include/hardware/gpio.h b/src/host/hardware_gpio/include/hardware/gpio.h index 223c472..b2b83a1 100644 --- a/src/host/hardware_gpio/include/hardware/gpio.h +++ b/src/host/hardware_gpio/include/hardware/gpio.h @@ -152,7 +152,9 @@ void gpio_set_dir_all_bits(uint32_t value); void gpio_set_dir(uint gpio, bool out); // debugging +#ifndef PICO_DEBUG_PIN_BASE #define PICO_DEBUG_PIN_BASE 19u +#endif // note these two macros may only be used once per compilation unit #define CU_REGISTER_DEBUG_PINS(p, ...) diff --git a/src/host/pico_platform/include/pico/platform.h b/src/host/pico_platform/include/pico/platform.h index 98363a3..f415b12 100644 --- a/src/host/pico_platform/include/pico/platform.h +++ b/src/host/pico_platform/include/pico/platform.h @@ -27,8 +27,8 @@ extern "C" { #define __scratch_x(group) #define __scratch_y(group) -#define __packed_aligned -#define __packed +#define __packed __attribute__((packed)) +#define __packed_aligned __packed __attribute((aligned)) #define __time_critical_func(x) x #define __after_data(group)