drivers/arygon: do not hard code PN532 chip type: pn53x_init() determine it and ARYGON device seems to not need to be waken up.

This commit is contained in:
Romuald Conty 2011-03-04 11:26:15 +00:00
parent fe7ec36fb7
commit 172beccf6c

View file

@ -168,13 +168,13 @@ arygon_connect (const nfc_device_desc_t * pndd)
// We have a connection // We have a connection
pnd = malloc (sizeof (nfc_device_t)); pnd = malloc (sizeof (nfc_device_t));
strncpy (pnd->acName, pndd->acDevice, DEVICE_NAME_LENGTH - 1); strncpy (pnd->acName, pndd->acDevice, DEVICE_NAME_LENGTH - 1);
pnd->acName[DEVICE_NAME_LENGTH - 1] = '\0';
pnd->driver_data = malloc(sizeof(struct arygon_data)); pnd->driver_data = malloc(sizeof(struct arygon_data));
((struct arygon_data*)(pnd->driver_data))->port = sp; ((struct arygon_data*)(pnd->driver_data))->port = sp;
pnd->chip_data = malloc(sizeof(struct pn53x_data)); pnd->chip_data = malloc(sizeof(struct pn53x_data));
((struct pn53x_data*)(pnd->chip_data))->type = PN532;
((struct pn53x_data*)(pnd->chip_data))->state = SLEEP; // The PN53x chip connected to ARYGON MCU doesn't seems to be in SLEEP mode
((struct pn53x_data*)(pnd->chip_data))->state = NORMAL;
pnd->driver = &arygon_driver; pnd->driver = &arygon_driver;
// Check communication using "Reset TAMA" command // Check communication using "Reset TAMA" command