Skip to content

west.yaml: update hal_rpi_pico to be based on Pico SDK 2.1.0 #84204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions drivers/counter/counter_rpi_pico_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ static uint32_t counter_rpi_pico_timer_get_top_value(const struct device *dev)

static int counter_rpi_pico_timer_get_value(const struct device *dev, uint32_t *ticks)
{
*ticks = time_us_32();
const struct counter_rpi_pico_timer_config *config = dev->config;

*ticks = timer_time_us_32(config->timer);
return 0;
}

Expand Down Expand Up @@ -158,14 +160,15 @@ static int counter_rpi_pico_timer_set_guard_period(const struct device *dev, uin
static void counter_rpi_pico_irq_handle(uint32_t ch, void *arg)
{
struct device *dev = arg;
const struct counter_rpi_pico_timer_config *config = dev->config;
struct counter_rpi_pico_timer_data *data = dev->data;
counter_alarm_callback_t cb = data->ch_data[ch].callback;
void *user_data = data->ch_data[ch].user_data;

if (cb) {
data->ch_data[ch].callback = NULL;
data->ch_data[ch].user_data = NULL;
cb(dev, ch, time_us_32(), user_data);
cb(dev, ch, timer_time_us_32(config->timer), user_data);
}
}

Expand Down
2 changes: 2 additions & 0 deletions modules/hal_rpi_pico/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if(CONFIG_HAS_RPI_PICO)

zephyr_include_directories(
${common_dir}/pico_base_headers/include
${rp2_common_dir}/boot_bootrom_headers/include
${rp2_common_dir}/hardware_base/include
${rp2_common_dir}/hardware_clocks/include
${rp2_common_dir}/hardware_watchdog/include
Expand All @@ -82,6 +83,7 @@ if(CONFIG_HAS_RPI_PICO)
${rp2_common_dir}/hardware_ticks/include
${rp2_common_dir}/hardware_sync_spin_lock/include
${rp2_common_dir}/pico_bootrom/include
${rp2_common_dir}/pico_flash/include
${rp2_common_dir}/pico_platform_compiler/include
${rp2_common_dir}/pico_platform_sections/include
${rp2_common_dir}/pico_platform_panic/include
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
&timer0 {
status = "okay";
};

&timer1 {
status = "okay";
};
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ manifest:
- hal
- name: hal_rpi_pico
path: modules/hal/rpi_pico
revision: 79ee0f9e058a6327fc943d2f2a19cf3ade107cec
revision: 7b57b24588797e6e7bf18b6bda168e6b96374264
groups:
- hal
- name: hal_silabs
Expand Down
Loading