diff --git a/esphome/components/am2320/am2320.cpp b/esphome/components/am2320/am2320.cpp index 85f8b75ee9..462e736981 100644 --- a/esphome/components/am2320/am2320.cpp +++ b/esphome/components/am2320/am2320.cpp @@ -12,13 +12,11 @@ namespace am2320 { static const char *TAG = "am2320"; // ---=== Calc CRC16 ===--- -uint16_t crc_16(uint8_t *ptr, uint8_t length) -{ +uint16_t crc_16(uint8_t *ptr, uint8_t length) { uint16_t crc = 0xFFFF; uint8_t i; //------------------------------ - while (length--) - { + while (length--) { crc ^= *ptr++; for (i = 0; i < 8; i++) if ((crc & 0x01) != 0) {