AVR (ATmega328P): UART/SPI HAL, drivers.zig, and nRF24L01+ driver (Emakefun RF-Nano V3.0)
維護者通常 1 天內回覆
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- zig
- 領域
- embedded-iot
研究方向
Start with the referenced ATtiny port (#947), the related issues #637 and #701, and the existing work listed in the body, especially draft #1070. The plan spans an ATmega328P HAL, adapters, timing, an nRF24L01+ driver with unit tests, and examples; first get maintainer feedback on the open API and hardware questions. Done means the proposed steps are accepted and implemented, including tested send/receive examples.
由索引模型根據 Issue 內容生成。
描述
I'd like to add support for the Emakefun RF-Nano V3.0 (repo): an Arduino Nano clone (ATmega328P @ 16 MHz) with an onboard nRF24L01+ on the hardware SPI bus. I have the boards and test everything on hardware.
Already up: #1063 (blinky delay), #1064 (board), #1068 (.rodata in RAM, fixes #679), #1071 (GPIO read() fix) and #1070 (UART HAL, draft).
Plan, one PR per step, with HAL files under hals/atmega328p/ like the ATtiny port (#947):
- UART (#1070).
- SPI host HAL.
drivers.zigadapting the HAL toDatagramDevice,Digital_IOandClockDevice, like ch32v, plus a small Timer0-basedtime.zig.- An MCU-agnostic nRF24L01+ driver in
drivers/src/wireless, followingssd1306.zig, with unit tests. It polls STATUS, since IRQ isn't wired on this board. - Send/receive examples between two boards.
Note: on AVR, Zig 0.17.0 fails to compile some error unions with a payload (ziglang/zig#37099, fix pending). So for now there's no std.Io for the UART, and drivers can't use DatagramDevice.read.
Questions:
DatagramDevicehas no full-duplex transfer, so the STATUS byte the nRF24 sends back with every command is lost, and the driver needs an extra transaction to read it. Is that fine, or would you rather add atransceiveoperation (related to #637/#701)?ClockDeviceneeds a monotonicu64microsecond clock. I'd use the Timer0 overflow (4 µs ticks), with the HAL exporting theTIMER0_OVFhandler for the app to register. That takes over PWM on D5/D6. OK, or is there a preferred approach?- AVR GPIO uses
sbi/cbi, which need comptime operands, so theDigital_IOadapter would be one type per comptime pin (e.g.GPIO_Device(.d, 7)). OK?
Is the nRF24 driver welcome in drivers/? Any feedback is appreciated!
- 主要語言
- Zig
- 星號
- 2.3k
- 分支
- 198
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 37
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ZigEmbeddedGroup/microzig 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 88/100
ZigEmbeddedGroup/microzig#1086 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 69/100
ZigEmbeddedGroup/microzig#1085 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
ZigEmbeddedGroup/microzig#1061 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
ZigEmbeddedGroup/microzig#1059 · 1 則留言 ·
維護者通常 1 天內回覆
-
regz: AVR peripherals generated at address 0 when the register-group name matches the module (ATDF)未關閉
難度 4/5 3-5 天 新手友好度 48/100
ZigEmbeddedGroup/microzig#1072 ·
維護者通常 1 天內回覆
查看 ZigEmbeddedGroup/microzig 的全部 Issue
相似的 Issue
-
stlink_probe._get_board_id() raises TypeError, not KeyError, when mbed.htm exists but has no TargetID可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
problem
難度 2/5 1-3 小時 新手友好度 65/100
Koenkk/zigbee2mqtt#33373 ·
維護者通常 1 天內回覆
-
priority: low
難度 2/5 1-3 小時 新手友好度 82/100
zephyrproject-rtos/zephyr#122050 ·
維護者通常 3 天內回覆
-
1 type: problem 2 scope: firmware 3 good first issue
難度 2/5 1-3 小時 新手友好度 65/100
SpaceTeam/STS1_COBC_SW#511 ·
-
documentation good first issue
難度 2/5 半天 新手友好度 60/100
imaaiagent/fumi#1 ·