mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 07:08:20 +00:00
Removed extra newlines
This commit is contained in:
parent
f59b527bc8
commit
3bff3378dd
@ -12,13 +12,11 @@ namespace am2320 {
|
|||||||
static const char *TAG = "am2320";
|
static const char *TAG = "am2320";
|
||||||
|
|
||||||
// ---=== Calc CRC16 ===---
|
// ---=== 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;
|
uint16_t crc = 0xFFFF;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
//------------------------------
|
//------------------------------
|
||||||
while (length--)
|
while (length--) {
|
||||||
{
|
|
||||||
crc ^= *ptr++;
|
crc ^= *ptr++;
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
if ((crc & 0x01) != 0) {
|
if ((crc & 0x01) != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user