1
0
mirror of https://github.com/whowechina/aic_pico.git synced 2025-01-19 11:18:39 +01:00

Fix some PN5180 not identifed issue

This commit is contained in:
whowechina 2024-01-29 22:43:18 +08:00
parent aad7939f52
commit e6123f7daf
2 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@ -63,9 +63,9 @@ bool pn5180_init(spi_inst_t *port, uint8_t rx, uint8_t sck, uint8_t tx,
spi.nss = nss;
spi.busy = busy;
uint8_t buf[4];
pn5180_read_eeprom(0x10, buf, sizeof(buf));
return (buf[0] >= 3) && (buf[0] <= 10) && (buf[2] >=3) && (buf[2] <= 10);
uint8_t buf[2];
pn5180_read_eeprom(0x12, buf, sizeof(buf));
return (buf[0] <= 15) && (buf[1] >= 2) && (buf[1] <= 15);
}
static pn5180_wait_loop_t wait_loop = NULL;