diff --git a/src/host/pico_time_adapter/include/pico/time_adapter.h b/src/host/pico_time_adapter/include/pico/time_adapter.h index c60c66420..74f8de22a 100644 --- a/src/host/pico_time_adapter/include/pico/time_adapter.h +++ b/src/host/pico_time_adapter/include/pico/time_adapter.h @@ -19,7 +19,7 @@ void ta_clear_force_irq(alarm_pool_timer_t *timer, uint hardware_alarm_num); void ta_clear_irq(alarm_pool_timer_t *timer, uint hardware_alarm_num); void ta_force_irq(alarm_pool_timer_t *timer, uint hardware_alarm_num); void ta_set_timeout(alarm_pool_timer_t *timer, uint hardware_alarm_num, int64_t target); -void ta_wakes_up_on_or_before(alarm_pool_timer_t *timer, uint alarm_num, int64_t target); +bool ta_wakes_up_on_or_before(alarm_pool_timer_t *timer, uint alarm_num, int64_t target); void ta_enable_irq_handler(alarm_pool_timer_t *timer, uint hardware_alarm_num, void (*irq_handler)(void)); void ta_disable_irq_handler(alarm_pool_timer_t *timer, uint hardware_alarm_num, void (*irq_handler)(void)); void ta_hardware_alarm_claim(alarm_pool_timer_t *timer, uint hardware_alarm_num); diff --git a/src/host/pico_time_adapter/time_adapter.c b/src/host/pico_time_adapter/time_adapter.c index ff8433d74..e805b3017 100644 --- a/src/host/pico_time_adapter/time_adapter.c +++ b/src/host/pico_time_adapter/time_adapter.c @@ -28,7 +28,7 @@ void PICO_WEAK_FUNCTION_IMPL_NAME(ta_set_timeout)(alarm_pool_timer_t *timer, uin panic_unsupported(); } PICO_WEAK_FUNCTION_DEF(ta_wakes_up_on_or_before) -void PICO_WEAK_FUNCTION_IMPL_NAME(ta_wakes_up_on_or_before)(alarm_pool_timer_t *timer, uint hardware_alarm_num, int64_t target) { +bool PICO_WEAK_FUNCTION_IMPL_NAME(ta_wakes_up_on_or_before)(alarm_pool_timer_t *timer, uint hardware_alarm_num, int64_t target) { panic_unsupported(); } PICO_WEAK_FUNCTION_DEF(ta_enable_irq_handler) diff --git a/src/rp2_common/hardware_flash/flash.c b/src/rp2_common/hardware_flash/flash.c index f217284a9..902d0daf7 100644 --- a/src/rp2_common/hardware_flash/flash.c +++ b/src/rp2_common/hardware_flash/flash.c @@ -335,9 +335,9 @@ void flash_devinfo_set_cs_size(uint cs, flash_devinfo_size_t size) { invalid_params_if(HARDWARE_FLASH, cs > 1); invalid_params_if(HARDWARE_FLASH, (uint)size > (uint)FLASH_DEVINFO_SIZE_MAX); uint cs_shift = cs == 0u ? OTP_DATA_FLASH_DEVINFO_CS0_SIZE_LSB : OTP_DATA_FLASH_DEVINFO_CS1_SIZE_LSB; - uint cs_mask = OTP_DATA_FLASH_DEVINFO_CS0_SIZE_BITS >> OTP_DATA_FLASH_DEVINFO_CS0_SIZE_LSB; + uint16_t cs_mask = OTP_DATA_FLASH_DEVINFO_CS0_SIZE_BITS >> OTP_DATA_FLASH_DEVINFO_CS0_SIZE_LSB; flash_devinfo_update_field( - (uint)size << cs_shift, + (uint16_t)size << cs_shift, cs_mask << cs_shift ); } @@ -364,7 +364,7 @@ void flash_devinfo_set_cs_gpio(uint cs, uint gpio) { invalid_params_if(HARDWARE_FLASH, gpio >= NUM_BANK0_GPIOS); (void)cs; flash_devinfo_update_field( - gpio << OTP_DATA_FLASH_DEVINFO_CS1_GPIO_LSB, + ((uint16_t)gpio) << OTP_DATA_FLASH_DEVINFO_CS1_GPIO_LSB, OTP_DATA_FLASH_DEVINFO_CS1_GPIO_BITS ); } diff --git a/src/rp2_common/hardware_pio/pio.c b/src/rp2_common/hardware_pio/pio.c index e0fe2e76b..ed34cd815 100644 --- a/src/rp2_common/hardware_pio/pio.c +++ b/src/rp2_common/hardware_pio/pio.c @@ -292,7 +292,7 @@ void pio_sm_set_pins_with_mask64(PIO pio, uint sm, uint64_t pin_values, uint64_t pin_values >>= pio_get_gpio_base(pio); pin_mask >>= pio_get_gpio_base(pio); #endif - pio_sm_set_pins_with_mask_internal(pio, sm, pin_values, pin_mask); + pio_sm_set_pins_with_mask_internal(pio, sm, (uint32_t)pin_values, (uint32_t)pin_mask); } void pio_sm_set_pindirs_with_mask_internal(PIO pio, uint sm, uint32_t pindirs, uint32_t pin_mask) { diff --git a/src/rp2_common/pico_bootrom/bootrom.c b/src/rp2_common/pico_bootrom/bootrom.c index f897da34e..344e3724c 100644 --- a/src/rp2_common/pico_bootrom/bootrom.c +++ b/src/rp2_common/pico_bootrom/bootrom.c @@ -76,7 +76,7 @@ void __attribute__((noreturn)) rom_reset_usb_boot_extra(int usb_activity_gpio_pi flags |= BOOTSEL_FLAG_GPIO_PIN_ACTIVE_LOW; } } - rom_reboot(REBOOT2_FLAG_REBOOT_TYPE_BOOTSEL | REBOOT2_FLAG_NO_RETURN_ON_SUCCESS, 10, flags, usb_activity_gpio_pin); + rom_reboot(REBOOT2_FLAG_REBOOT_TYPE_BOOTSEL | REBOOT2_FLAG_NO_RETURN_ON_SUCCESS, 10, flags, (uint)usb_activity_gpio_pin); __builtin_unreachable(); #else panic_unsupported();