From df82c4dd7c6d5ad232b5628edf73aa9ea3f8c2c0 Mon Sep 17 00:00:00 2001 From: Daniel TOMAS Date: Thu, 1 Sep 2011 17:09:40 +0200 Subject: Patch to add an API to load a FW image in the libnfc This new API permit to load the PN544 FW image when a download is needed at boot time. Change-Id: I2b3406d7ae0f0211123bd680ef914e9948c81eef --- src/phLibNfc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/phLibNfc.c') diff --git a/src/phLibNfc.c b/src/phLibNfc.c index c08d044..e0ef435 100644 --- a/src/phLibNfc.c +++ b/src/phLibNfc.c @@ -45,6 +45,8 @@ *************************** Macro's ****************************************** */ +extern int dlopen_firmware(); + #ifndef STATIC_DISABLE #define STATIC static #else @@ -106,6 +108,7 @@ NFCSTATUS phLibNfc_HW_Reset () { NFCSTATUS Status = NFCSTATUS_SUCCESS; + Status = phDal4Nfc_Reset(1); Status = phDal4Nfc_Reset(0); Status = phDal4Nfc_Reset(1); @@ -117,6 +120,13 @@ NFCSTATUS phLibNfc_Download_Mode () return phDal4Nfc_Download(); } +int phLibNfc_Load_Firmware_Image () +{ + int status; + status = dlopen_firmware(); + return status; +} + extern uint8_t nxp_nfc_isoxchg_timeout; NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout) { -- cgit v1.2.3