AVR (ATmega328P): UART/SPI HAL, drivers.zig, and nRF24L01+ driver (Emakefun RF-Nano V3.0)
Maintainer antworten meist innerhalb von 1 Tag
@matpala arbeitet bereits daran.
Seit 08.10.2026.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- zig
- Bereich
- embedded-iot
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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!
- Vorherrschende Sprache
- Zig
- Sterne
- 2.3k
- Forks
- 198
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 37
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ZigEmbeddedGroup/microzig
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
ZigEmbeddedGroup/microzig#1086 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 69/100
ZigEmbeddedGroup/microzig#1085 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ZigEmbeddedGroup/microzig#1061 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ZigEmbeddedGroup/microzig#1059 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
regz: AVR peripherals generated at address 0 when the register-group name matches the module (ATDF)Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
ZigEmbeddedGroup/microzig#1072 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ZigEmbeddedGroup/microzig
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
1 type: problem 2 scope: firmware 3 good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
SpaceTeam/STS1_COBC_SW#511 ·
-
documentation good first issue
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 60/100
imaaiagent/fumi#1 ·
-
[BUG] OTA Requestor accepts reserved provider endpoint 0xFFFFEvtl. vergeben @Chapoly1305 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
project-chip/connectedhomeip#74742 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
Xinyuan-LilyGO/T-Display-S3#352 · 3 Kommentare ·