1 /* 2 * Copyright 2021-2022 NXP 3 * All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #include "wifi_bt_config.h" 9 #include "fsl_gpio.h" 10 11 /******************************************************************************* 12 * Definitions 13 ******************************************************************************/ 14 #ifdef WIFI_BT_USE_M2_INTERFACE 15 #warning "M.2 interface is not supported on this board" 16 #endif 17 18 /******************************************************************************* 19 * Prototypes 20 ******************************************************************************/ 21 22 /******************************************************************************* 23 * Variables 24 ******************************************************************************/ 25 26 /******************************************************************************* 27 * Code 28 ******************************************************************************/ 29 BOARD_WIFI_BT_Enable(bool enable)30void BOARD_WIFI_BT_Enable(bool enable) 31 { 32 if (enable) 33 { 34 /* Enable module */ 35 /* Enable power supply for SD */ 36 GPIO_PortSet(BOARD_SDMMC_SD_POWER_RESET_GPIO_BASE, BOARD_SDMMC_SD_POWER_RESET_GPIO_PORT, 37 1 << BOARD_SDMMC_SD_POWER_RESET_GPIO_PIN); 38 } 39 else 40 { 41 /* Disable module */ 42 /* Disable power supply for SD */ 43 GPIO_PortClear(BOARD_SDMMC_SD_POWER_RESET_GPIO_BASE, BOARD_SDMMC_SD_POWER_RESET_GPIO_PORT, 44 1 << BOARD_SDMMC_SD_POWER_RESET_GPIO_PIN); 45 } 46 vTaskDelay(pdMS_TO_TICKS(100)); 47 } 48 BOARD_WIFI_BT_Config(void * card,sdio_int_t cardInt)49void BOARD_WIFI_BT_Config(void *card, sdio_int_t cardInt) 50 { 51 BOARD_SDIO_Config(card, NULL, BOARD_SDMMC_SDIO_HOST_IRQ_PRIORITY, cardInt); 52 BOARD_WIFI_BT_Enable(false); 53 } 54