Skip to content

Commented RECEIVE_TIMEOUT_VALUE as variable seems unused #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/SparkFunSX1509.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ void SX1509::debounceTime(uint8_t time)
uint8_t configValue = 0;
// We'll check for the highest set bit position,
// and use that for debounceConfig
for (uint8_t i = 7; i >= 0; i--)
for (int8_t i = 7; i >= 0; i--)
{
if (time & (1 << i))
{
Expand Down Expand Up @@ -727,7 +727,8 @@ uint8_t SX1509::calculateSlopeRegister(uint8_t ms, uint8_t onIntensity, uint8_t
uint8_t SX1509::readByte(uint8_t registerAddress)
{
uint8_t readValue;
uint16_t timeout = RECEIVE_TIMEOUT_VALUE;
// Commented the line as variable seems unused;
//uint16_t timeout = RECEIVE_TIMEOUT_VALUE;

_i2cPort->beginTransmission(deviceAddress);
_i2cPort->write(registerAddress);
Expand All @@ -748,7 +749,8 @@ uint16_t SX1509::readWord(uint8_t registerAddress)
{
uint16_t readValue;
uint16_t msb, lsb;
uint16_t timeout = RECEIVE_TIMEOUT_VALUE * 2;
// Commented the line as variable seems unused;
//uint16_t timeout = RECEIVE_TIMEOUT_VALUE * 2;

_i2cPort->beginTransmission(deviceAddress);
_i2cPort->write(registerAddress);
Expand Down