Proper powerdown command

This commit is contained in:
Laura Hausmann 2023-07-05 23:54:24 +02:00
parent ab3e73c389
commit 0d12b201f1
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -44,7 +44,8 @@ void PN532Reader::cycleMode() {
}
void PN532Reader::end() {
pn532->sendCommandCheckAck(new byte[1]{PN532_COMMAND_POWERDOWN}, 1, 1);
// Power down but allow wakeups from I2C and SPI
pn532->sendCommandCheckAck(new byte[2]{PN532_COMMAND_POWERDOWN, 0b10100000}, 2, 1);
}
bool PN532Reader::isNewCardPresent() {