wifi: airoc: remove dependency on CYHAL
Removing dependency on cyhal in airoc wifi driver. It need to build airoc wifi driver with different than PSoC 6 Soc like STM32 Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This commit is contained in:
parent
5f95ec76a1
commit
a83d2dad8d
|
@ -11,6 +11,7 @@
|
||||||
#include <bus_protocols/whd_bus.h>
|
#include <bus_protocols/whd_bus.h>
|
||||||
#include <bus_protocols/whd_sdio.h>
|
#include <bus_protocols/whd_sdio.h>
|
||||||
#include <zephyr/sd/sd.h>
|
#include <zephyr/sd/sd.h>
|
||||||
|
#include <cy_utils.h>
|
||||||
|
|
||||||
#define DT_DRV_COMPAT infineon_airoc_wifi
|
#define DT_DRV_COMPAT infineon_airoc_wifi
|
||||||
|
|
||||||
|
@ -103,14 +104,14 @@ int airoc_wifi_power_on(const struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allow CBUCK regulator to discharge */
|
/* Allow CBUCK regulator to discharge */
|
||||||
(void)cyhal_system_delay_ms(WLAN_CBUCK_DISCHARGE_MS);
|
(void)k_msleep(WLAN_CBUCK_DISCHARGE_MS);
|
||||||
|
|
||||||
/* WIFI power on */
|
/* WIFI power on */
|
||||||
ret = gpio_pin_set_dt(&config->wifi_reg_on_gpio, 1);
|
ret = gpio_pin_set_dt(&config->wifi_reg_on_gpio, 1);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
(void)cyhal_system_delay_ms(WLAN_POWER_UP_DELAY_MS);
|
(void)k_msleep(WLAN_POWER_UP_DELAY_MS);
|
||||||
#endif /* DT_INST_NODE_HAS_PROP(0, reg_on_gpios) */
|
#endif /* DT_INST_NODE_HAS_PROP(0, reg_on_gpios) */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <zephyr/sd/sdio.h>
|
#include <zephyr/sd/sdio.h>
|
||||||
#include <zephyr/drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
#include <zephyr/net/wifi_mgmt.h>
|
#include <zephyr/net/wifi_mgmt.h>
|
||||||
#include <cyhal.h>
|
#include <cy_utils.h>
|
||||||
|
|
||||||
struct airoc_wifi_data {
|
struct airoc_wifi_data {
|
||||||
struct sd_card card;
|
struct sd_card card;
|
||||||
|
|
|
@ -39,6 +39,12 @@ endif()
|
||||||
## Add Wi-Fi assets for AIROC devices
|
## Add Wi-Fi assets for AIROC devices
|
||||||
if (CONFIG_WIFI_AIROC)
|
if (CONFIG_WIFI_AIROC)
|
||||||
add_subdirectory(wifi-host-driver)
|
add_subdirectory(wifi-host-driver)
|
||||||
|
|
||||||
|
## Add core-lib sources for CAT1 devices
|
||||||
|
add_subdirectory_ifndef(CONFIG_SOC_FAMILY_INFINEON_CAT1 core-lib)
|
||||||
|
|
||||||
|
## Add abstraction-rtos sources
|
||||||
|
add_subdirectory_ifndef(CONFIG_SOC_FAMILY_INFINEON_CAT1 abstraction-rtos)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## Add BT assets for AIROC devices
|
## Add BT assets for AIROC devices
|
||||||
|
|
|
@ -72,14 +72,14 @@ config USE_INFINEON_WDT
|
||||||
Enable WATCHDOG TIMER (WDT) HAL module
|
Enable WATCHDOG TIMER (WDT) HAL module
|
||||||
driver for Infineon devices
|
driver for Infineon devices
|
||||||
|
|
||||||
config USE_INFINEON_ABSTRACTION_RTOS
|
|
||||||
bool "Abstraction RTOS component (Zephyr support)"
|
|
||||||
help
|
|
||||||
Enable Abstraction RTOS component with Zephyr support
|
|
||||||
|
|
||||||
config USE_INFINEON_FLASH
|
config USE_INFINEON_FLASH
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
Enable Flash HAL module driver for Infineon devices
|
Enable Flash HAL module driver for Infineon devices
|
||||||
|
|
||||||
endif # SOC_FAMILY_PSOC6
|
endif # SOC_FAMILY_PSOC6
|
||||||
|
|
||||||
|
config USE_INFINEON_ABSTRACTION_RTOS
|
||||||
|
bool "Abstraction RTOS component (Zephyr support)"
|
||||||
|
help
|
||||||
|
Enable Abstraction RTOS component with Zephyr support
|
||||||
|
|
Loading…
Reference in a new issue