سلام. میتونید درباره این کد توضیح بدین که چیکار میکنه؟ بخش <s- , رو متوجه نمیشم شیفت که نیست و شرط هم نمیشه گفت چون خارج از دستور شرطی هم اومده
کد:
boolean readPMSdata(Stream *s) { if (! s->available()) { return false; } // Read a byte at a time until we get to the special '0x42' start-byte if (s->peek() != 0x42) { s->read(); return false; } // Now read all 32 bytes if (s->available() < 32) { return false; } uint8_t buffer[32]; uint16_t sum = 0; s->readBytes(buffer, 32); return true; }
دیدگاه