mccdaq / daqhats

MCC DAQ HAT Library for Raspberry Pi
Other
125 stars 88 forks source link

document buffer layout when sampling 1 or both channels #39

Closed jancumps closed 2 years ago

jancumps commented 2 years ago

The C library for mcc172 doesn't explain the data layout in the scanning buffer filled by mcc172_a_in_scan_start. You can find it by inspecting the code, but for an API user it would be a help if the API docs explained how the buffer is filled/layed-out when the mcc172 DAQ HAT is scanning CH0, CH1 or both together.

jeffreyg3 commented 2 years ago

Thank you for your feedback. When sampling from 1 channel, the data is in the order it was acquired. first sample first and so on. When sampling from both channels, the data is interleaved in the order it was acquired like this: Ch0, Ch1, Ch0, Ch1, Ch0, Ch1,....

jancumps commented 2 years ago

Thank you!