Skip to content

Commit

Permalink
Zero-initialize buffer used for ADC reads (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtzoeller committed Mar 25, 2024
1 parent c49e9cd commit 6d937c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/MCP3x6x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ MCP3x6x::status_t MCP3x6x::read(Adcdata *data) {
}
*/
uint8_t buffer[s];
memset(buffer, 0, s);

// while (status_dr()) {
_transfer(buffer, MCP3x6x_CMD_SREAD | MCP3x6x_ADR_ADCDATA, s);
Expand Down

0 comments on commit 6d937c6

Please sign in to comment.