Home | History | Annotate | Download | only in dnld
      1 /*
      2  * Copyright (C) 2010-2014 NXP Semiconductors
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 /*
     18  * Firmware Download Status Values
     19  */
     20 #ifndef PHDNLDNFC_STATUS_H
     21 #define PHDNLDNFC_STATUS_H
     22 
     23 #include <phNfcStatus.h>
     24 
     25 /* reusing LibNfcStatus.h value below as a placeholder for now, need to find
     26    the right value */
     27 #define NFCSTATUS_ABORTED                   (0x0096)   /* Command aborted */
     28 
     29 /*
     30  * Enum definition contains Firmware Download Status codes
     31  */
     32 typedef enum phDnldNfc_Status
     33 {
     34     PH_DL_STATUS_PLL_ERROR                        = 0x0D,
     35     PH_DL_STATUS_LC_WRONG                         = 0x13,
     36     PH_DL_STATUS_LC_TERMINATION_NOT_SUPPORTED     = 0x14,
     37     PH_DL_STATUS_LC_CREATION_NOT_SUPPORTED        = 0x15,
     38     PH_DL_STATUS_LC_UNKNOWN                       = 0x16,
     39     PH_DL_STATUS_AUTHENTICATION_ERROR             = 0x19,
     40     PH_DL_STATUS_NOT_AUTHENTICATED                = 0x1A,
     41     PH_DL_STATUS_AUTHENTICATION_LOST              = 0x1B,
     42     PH_DL_STATUS_WRITE_PROTECTED                  = 0x1C,
     43     PH_DL_STATUS_READ_PROTECTED                   = 0x1D,
     44     PH_DL_STATUS_ADDR_RANGE_OFL_ERROR             = 0x1E,
     45     PH_DL_STATUS_BUFFER_OFL_ERROR                 = 0x1F,
     46     PH_DL_STATUS_MEM_BSY                          = 0x20,
     47     PH_DL_STATUS_SIGNATURE_ERROR                  = 0x21,
     48     PH_DL_STATUS_SESSION_WAS_OPEN                 = 0x22,
     49     PH_DL_STATUS_SESSION_WAS_CLOSED               = 0x23,
     50     /* the Firmware version passed to CommitSession is not greater than
     51         the EEPROM resident stored Firmware version number */
     52     PH_DL_STATUS_FIRMWARE_VERSION_ERROR           = 0x24,
     53     PH_DL_STATUS_LOOPBACK_DATA_MISSMATCH_ERROR    = 0x25,
     54       /*****************************/
     55     PH_DL_STATUS_HOST_PAYLOAD_UFL_ERROR           = 0x26,
     56     PH_DL_STATUS_HOST_PAYLOAD_OFL_ERROR           = 0x27,
     57     PH_DL_STATUS_PROTOCOL_ERROR                   = 0x28,
     58       /* Download codes re-mapped to generic entries */
     59     PH_DL_STATUS_INVALID_ADDR                     = NFCSTATUS_INVALID_PARAMETER,
     60     PH_DL_STATUS_GENERIC_ERROR                    = NFCSTATUS_FAILED,
     61     PH_DL_STATUS_ABORTED_CMD                      = NFCSTATUS_ABORTED,
     62     PH_DL_STATUS_FLASH_WRITE_PROTECTED            = PH_DL_STATUS_WRITE_PROTECTED,
     63     PH_DL_STATUS_FLASH_READ_PROTECTED             = PH_DL_STATUS_READ_PROTECTED,
     64     PH_DL_STATUS_USERDATA_WRITE_PROTECTED         = PH_DL_STATUS_WRITE_PROTECTED,
     65     PH_DL_STATUS_USERDATA_READ_PROTECTED          = PH_DL_STATUS_READ_PROTECTED,
     66     PH_DL_STATUS_OK                               = NFCSTATUS_SUCCESS
     67 } phDnldNfc_Status_t ;
     68 
     69 #endif /* PHDNLDNFC_STATUS_H */
     70