analogdevicesinc / no-OS

Software drivers in C for systems without an operating system
http://analogdevicesinc.github.io/no-OS/
Other
971 stars 1.67k forks source link

Fix AD4170 channel data reg read #2338

Closed machschmitt closed 1 month ago

machschmitt commented 1 month ago

AD4170 has a 3-byte size register for ADC data and ad4170 driver internals use a bit pre-pended to the register address to determine how many bytes to read. Fix AD4170 DATA_PER_CHANNEL register read by pre-pending the correct byte size bit to the channel data register address.

Fixes: 3c02acbb0c38 ("add ad4170 device driver")

Pull Request Description

Fixes AD4170 DATA_PER_CHANNEL register read. Bug reported by ADI application engineer.

PR Type

PR Checklist