Fix Clang 11 finds (#1880)

This commit is contained in:
Stefan Agner
2021-06-08 22:47:43 +02:00
committed by GitHub
parent 0426be9280
commit b80f3fdec9
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ void SPIAS3935Component::write_register(uint8_t reg, uint8_t mask, uint8_t bits,
uint8_t SPIAS3935Component::read_register(uint8_t reg) {
uint8_t value = 0;
this->enable();
this->write_byte(reg |= SPI_READ_M);
this->write_byte(reg | SPI_READ_M);
value = this->read_byte();
// According to datsheet, the chip select must be written HIGH, LOW, HIGH
// to correctly end the READ command.