Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Generic Read-Write descriptor for driver framework/SPI

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
领域
embedded-iot

调研方向

The issue is a design sketch for a generic SPI transfer API: a transceivev function taking a slice of Transaction structs with input, output, offsets, min_len and pad fields, plus a length helper. It names no existing file or test. Settling the shape of the API with maintainers comes before any code, and the thread has been idle for about 290 days. Done would mean an agreed design and a follow-up issue or proposal, not a patch.

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

描述

driver framework

Just dumping this so it isn't lost in the Discord:

An idea we could use for an abstract SPI transfer system:

fn transceivev(actions: []const Transaction) !usize;

const Transaction = struct {
  /// buffer to receive
  input: []u8 = &.{},
  /// index of first received byte
  input_offset: usize = 0,
  /// buffer to send
  output: []const u8 = &.{},
  /// index of first sent byte
  output_offset: usize = 0,
  /// transceive at least this amount of items
  min_len: usize = 0,
  /// output when total len bigger than output.len
  pad: u8 = 0x00,

  pub fn length(t: @This()) usize {
    return @max(
      t.min_length,
      t.input_offset + t.input.len,
      t.output_offset + t.output.len,
    );
  }
};
主要语言
Zig
星标
2.3k
派生
198
平均合并
1 天 8 小时
30 天内合并 PR
37

环境准备

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

从这里开始

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

ZigEmbeddedGroup/microzig 的其他 Issue

查看 ZigEmbeddedGroup/microzig 的全部 Issue

相似的 Issue

更多 Embedded & IoT Issue

把新 issue 发到你的邮箱

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