avr-hal icon indicating copy to clipboard operation
avr-hal copied to clipboard

generic spi?

Open marrsus opened this issue 2 years ago • 3 comments

i am working with an pololu ZUMO 32U4 oled. it uses an atmega32u4. The problem is i can't figure out how to make a spi connection with the oled. the problem being that the makers of this board uses other pins and i can't seam to find a spi implementation that allow for me to make the spi interface

marrsus avatar Nov 12 '23 14:11 marrsus

Hi, we only implement a driver for the hardware SPI peripheral here in avr-hal. If you need to talk SPI with different pins you have to use a software implementation of the protocol instead. Maybe the one from bitbang-hal does the trick?

Rahix avatar Nov 16 '23 23:11 Rahix

looks promising, do you have a embedded-hal::timer implementation for avr-hal or do i have to try my luck at making my own

marrsus avatar Nov 17 '23 09:11 marrsus

Hm, I'm afraid we don't have an e-h::timer implementation right now :/ Your best bet right now is building your own using a hardware timer and its registers directly...

Rahix avatar Nov 19 '23 22:11 Rahix