VSF Documented
vsf_wifi_aic8800d.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
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 * either express or implied. See the License for the specific language *
13 * governing permissions and limitations under the License. *
14 * *
15 ****************************************************************************/
16
17#ifndef __VSF_WIFI_AIC8800D_H__
18#define __VSF_WIFI_AIC8800D_H__
19
20/*============================ INCLUDES ======================================*/
21
22#include "../../vsf_wifi_cfg.h"
23
24#if VSF_USE_WIFI == ENABLED && VSF_WIFI_USE_AIC8800D == ENABLED
25
26#include "../../vsf_wifi.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/*============================ LOGGING HELPERS ===============================*/
33
34#if VSF_WIFI_CFG_CHIP_AIC8800D_LOG_LEVEL >= 1
35# define vsf_wifi_aic8800d_trace_error(...) vsf_trace_error(__VA_ARGS__)
36#else
37# define vsf_wifi_aic8800d_trace_error(...) ((void)0)
38#endif
39
40#if VSF_WIFI_CFG_CHIP_AIC8800D_LOG_LEVEL >= 2
41# define vsf_wifi_aic8800d_trace_info(...) vsf_trace_info(__VA_ARGS__)
42#else
43# define vsf_wifi_aic8800d_trace_info(...) ((void)0)
44#endif
45
46#if VSF_WIFI_CFG_CHIP_AIC8800D_LOG_LEVEL >= 4
47# define vsf_wifi_aic8800d_trace_debug(...) vsf_trace_info(__VA_ARGS__)
48#else
49# define vsf_wifi_aic8800d_trace_debug(...) ((void)0)
50#endif
51
52/*============================ TYPES =========================================*/
53
54/* Bus operations supplied by the USB host class driver to the chip driver. */
56 /* Base register-bus vtable. The generic wifi layer only uses on_ready;
57 * reg_read/reg_write are NULL because AIC8800D is message-based. */
59
60 /* Submit a raw bulk OUT buffer (already contains USB header + payload).
61 * Completion is fire-and-forget; the bus driver owns the URB pool. */
63 const uint8_t *data, uint16_t len, vsf_wifi_done_t done);
64
65 /* Return true if at least one TX URB slot is available. */
67
68 /* Set by the bus driver when the USB device is already running FullMAC
69 * firmware (runtime PID after boot-ROM firmware load). The chip driver
70 * will skip firmware upload and proceed directly to LMAC init. */
73
74/*============================ GLOBAL VARIABLES ==============================*/
75
77
78/* RX entry point called by the USB bus driver for every completed bulk IN URB. */
80
81#ifdef __cplusplus
82}
83#endif
84
85#endif /* VSF_USE_WIFI == ENABLED && VSF_WIFI_USE_AIC8800D == ENABLED */
86#endif /* __VSF_WIFI_AIC8800D_H__ */
vsf_err_t
Definition __type.h:42
bool
Definition type.h:60
struct ieee80211_ext_chansw_ie data
Definition ieee80211.h:80
unsigned short uint16_t
Definition stdint.h:7
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_wifi_aic8800d.h:55
vsf_wifi_reg_bus_t base
Definition vsf_wifi_aic8800d.h:58
bool(* can_send)(vsf_wifi_t *wifi)
Definition vsf_wifi_aic8800d.h:66
vsf_err_t(* send)(vsf_wifi_t *wifi, const uint8_t *data, uint16_t len, vsf_wifi_done_t done)
Definition vsf_wifi_aic8800d.h:62
bool skip_firmware_load
Definition vsf_wifi_aic8800d.h:71
Definition vsf_wifi.h:312
Definition vsf_wifi.h:215
Definition vsf_wifi_priv.h:57
void(* vsf_wifi_done_t)(vsf_wifi_t *wifi, vsf_err_t err)
Definition vsf_wifi.h:123
const vsf_wifi_chip_drv_t vsf_wifi_aic8800d_drv
Definition vsf_wifi_aic8800d.c:2188
void vsf_wifi_aic8800d_on_rx(vsf_wifi_t *wifi, uint8_t *buf, uint16_t len)
Definition vsf_wifi_aic8800d.c:584
struct vsf_wifi_aic8800d_bus_ops_t vsf_wifi_aic8800d_bus_ops_t
Generated from commit: vsfteam/vsf@5de27dd