piolib: add Pico SDK 2 PIO API

未关闭
#159 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
c
领域
embedded-iot

调研方向

Start in piolib.h and compare its PIO API with the Pico C/C++ SDK 2 APIs used by pioasm-generated code from pico-sdk-tools 2.0.0 or newer. Review the linked c_sdk_output.cpp reference and the linked sideset and consecutive-pins changes. Done means the requested compatible functions and updates are available in piolib.h.

由索引模型根据 Issue 内容生成。

描述

piolib.h is missing the new functions and updates/fixes from Pico C/C++ SDK 2, like (probably not all make sense [but might be convenient for portable code], and probably some are missing, but at least the ones used by pioasm-generated code using pico-sdk-tools ≥ v2.0.0 should be available):

sm_config_set_out_pin_base
sm_config_set_out_pin_count
sm_config_set_set_pin_base
sm_config_set_set_pin_count
sm_config_set_in_pin_base
sm_config_set_in_pin_count
sm_config_set_sideset_pin_base
sm_config_set_clkdiv_int_frac8
pio_enable_sm_mask_in_sync
pio_sm_get_pc
pio_sm_is_exec_stalled
pio_sm_set_wrap
pio_sm_set_out_pins
pio_sm_set_set_pins
pio_sm_set_in_pins
pio_sm_set_sideset_pins
pio_sm_set_jmp_pin
pio_sm_set_clkdiv_int_frac8
pio_sm_set_pins64
pio_sm_set_pins_with_mask64
pio_claim_free_sm_and_add_program
pio_claim_free_sm_and_add_program_for_gpio_range
pio_remove_program_and_unclaim_sm
pio_get_irq_num
pio_get_tx_fifo_not_full_interrupt_source
pio_get_rx_fifo_not_empty_interrupt_source
pio_set_gpio_base
pio_get_gpio_base
pio_get_funcsel
pio_get_instance
pio_get_dreq
pio_encode_sideset_opt
pio_sm_set_consecutive_pins

Update: some have been added in #226

主要语言
C
星标
351
派生
103
平均合并
1 天 18 分钟
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

raspberrypi/utils 的其他 Issue

查看 raspberrypi/utils 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。