periph / conn

Go·Hardware·Lean - Interfaces
https://periph.io
Apache License 2.0
67 stars 12 forks source link

I2C send nack #20

Open elamre opened 2 years ago

elamre commented 2 years ago

Hello, is it possible to send a nack back after reading out data? it defaults on an ACK, but some project I'm working on expects a nack after reading out some bytes. I can't find any way to currently do this in Periph.

maruel commented 2 years ago

Depends on the underlying device driver. For linux, I did:

git clone https://github.com/torvalds/linux
cd linux
git checkout v5.17
git grep -i nack -- "**i2c**" | grep -v "^driver"

I couldn't quickly figure out what's the trick.