AVR (ATmega328P): UART/SPI HAL, drivers.zig, and nRF24L01+ driver (Emakefun RF-Nano V3.0)
Mantenedores costumam responder em até 1 dia
@matpala já está trabalhando nisso.
Desde 8/10/2026.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- zig
- Domínio
- embedded-iot
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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!
- Linguagem predominante
- Zig
- Estrelas
- 2.3k
- Forks
- 198
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 37
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ZigEmbeddedGroup/microzig
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
ZigEmbeddedGroup/microzig#1086 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 69/100
ZigEmbeddedGroup/microzig#1085 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
ZigEmbeddedGroup/microzig#1061 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
ZigEmbeddedGroup/microzig#1059 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
regz: AVR peripherals generated at address 0 when the register-group name matches the module (ATDF)Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
ZigEmbeddedGroup/microzig#1072 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ZigEmbeddedGroup/microzig
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Koenkk/zigbee-herdsman-converters#13502 ·
Mantenedores costumam responder em até 1 dia
-
mediatek/filogic: OpenFi 6C (openfi,6c): func key has wrong polarity, event class and key codeAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
immortalwrt/immortalwrt#2501 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
zephyrproject-rtos/zephyr#122261 ·
Mantenedores costumam responder em até 3 dias
-
area: core priority: p2 type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
EPFL-TOP/smart-microscope-control#132 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
FujiNetWIFI/fujinet-config#264 ·
Mantenedores costumam responder em até 1 dia