1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 08:42:18 +01:00

Fix two i2c error code return errors (#2375)

This commit is contained in:
Otto Winter
2021-09-22 20:07:43 +02:00
committed by GitHub
parent edb557f79e
commit b398d826c1
2 changed files with 4 additions and 2 deletions

View File

@@ -12,7 +12,9 @@ namespace pn532_i2c {
static const char *const TAG = "pn532_i2c";
bool PN532I2C::write_data(const std::vector<uint8_t> &data) { return this->write(data.data(), data.size()); }
bool PN532I2C::write_data(const std::vector<uint8_t> &data) {
return this->write(data.data(), data.size()) == i2c::ERROR_OK;
}
bool PN532I2C::read_data(std::vector<uint8_t> &data, uint8_t len) {
delay(1);