Browse Source

i2c: reserved addresses

pull/2516/head
Maxim Prokhorov 2 years ago
parent
commit
c980acbd10
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      code/espurna/i2c.cpp

+ 3
- 3
code/espurna/i2c.cpp View File

@ -168,9 +168,9 @@ uint8_t findAndLock(const uint8_t* begin, const uint8_t* end) {
template <typename T>
void scan(T&& callback) {
static constexpr uint8_t AddressMin { 1 };
static constexpr uint8_t AddressMax { 127 };
for (auto address = AddressMin; address < AddressMax; ++address) {
static constexpr uint8_t Min { 0x8 };
static constexpr uint8_t Max { 0x78 };
for (auto address = Min; address < Max; ++address) {
if (find(address)) {
callback(address);
}


Loading…
Cancel
Save