1 /*
2  * Copyright (C) 2012-2020 NXP
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 #ifndef _PHNXPNCIHAL_DNLD_H_
17 #define _PHNXPNCIHAL_DNLD_H_
18 
19 #include <phNfcStatus.h>
20 #include <phNfcTypes.h>
21 
22 #define PHLIBNFC_DNLD_CHECKINTEGRITY_OFFSET (0x07)
23 
24 NFCSTATUS phNxpNciHal_fw_dnld_switch_normal_mode(void* pContext,
25                                                  NFCSTATUS fStatus,
26                                                  void* pInfo);
27 NFCSTATUS phNxpNciHal_fw_download_seq(uint8_t bClkSrcVal, uint8_t bClkFreqVal,
28                                       uint8_t seq_handler_offset = 0);
29 #define STREAM_TO_UINT32(u32, p)                                      \
30   {                                                                   \
31     (u32) = (((uint32_t)(*(p))) + ((((uint32_t)(*((p) + 1)))) << 8) + \
32              ((((uint32_t)(*((p) + 2)))) << 16) +                     \
33              ((((uint32_t)(*((p) + 3)))) << 24));                     \
34     (p) += 4;                                                         \
35   }
36 
37 #endif /* _PHNXPNCIHAL_DNLD_H_ */
38