Skip to content

Commit

Permalink
Fix esp-idf ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Nov 22, 2024
1 parent 03539ce commit 25c0019
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SensorCommon.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,20 +632,24 @@ protected:

void setClock(uint32_t frequency)
{
#if defined(ARDUINO)
if (__wire) {
__wire->setClock(frequency);
}
#endif
}

uint32_t getClock()
{
#if defined(ARDUINO)
if (__wire) {
#if defined(ARDUINO_ARCH_ESP32)
return __wire->getClock();
#else
return 100000;
#endif
}
#endif
return 0;
}

Expand Down

0 comments on commit 25c0019

Please sign in to comment.