Merge r511-519 from trunk.

This commit is contained in:
Romain Tartiere
2010-08-11 16:59:09 +00:00
8 changed files with 125 additions and 15 deletions

View File

@@ -233,12 +233,14 @@ nfc_device_t* nfc_connect(nfc_device_desc_t* pndd)
*/
void nfc_disconnect(nfc_device_t* pnd)
{
// Release and deselect all active communications
nfc_initiator_deselect_target(pnd);
// Disable RF field to avoid heating
nfc_configure(pnd,NDO_ACTIVATE_FIELD,false);
// Disconnect, clean up and release the device
pnd->pdc->disconnect(pnd);
if(pnd) {
// Release and deselect all active communications
nfc_initiator_deselect_target(pnd);
// Disable RF field to avoid heating
nfc_configure(pnd,NDO_ACTIVATE_FIELD,false);
// Disconnect, clean up and release the device
pnd->pdc->disconnect(pnd);
}
}
/**