1 /** @file fwdnld_intf_abs.c
2  *
3  *  @brief  This file provides interface abstraction APIs
4  *
5  *  Copyright 2023-2024 NXP
6  *
7  *  SPDX-License-Identifier: BSD-3-Clause
8  *
9  */
10 #include "fwdnld_intf_abs.h"
11 #include "fwdnld_sdio.h"
12 
13 /** API to init the interface
14  *
15  * This function calls internally the interface specific init
16  *
17  * \param[in] intf_type Its of type fwdnld_intf_type_t
18  * \param[in] intf_specific Initialisation sequence related any setting that
19  * the specific interface needs.
20  * \note intf_specific is to be interpretted and defined by each interface
21  *
22  * \return fwdnld_intf* Success, a pointer to interface is returned. To be used in
23  * further API calls to this inited interface.
24  * \return In case init fails, NULL is returned.
25  */
26 
fwdnld_intf_init(fwdnld_intf_type_t intf_type,void * intf_specific)27 fwdnld_intf_t *fwdnld_intf_init(fwdnld_intf_type_t intf_type, void *intf_specific)
28 {
29     if (intf_type == FWDNLD_INTF_SDIO)
30     {
31         return sdio_init_interface(intf_specific);
32     }
33     return NULL;
34 }
35