VSF Documented
vsf_wifi_rt28xx.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 * 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 ****************************************************************************/
17
18#ifndef __VSF_WIFI_RT28XX_H__
19#define __VSF_WIFI_RT28XX_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "../../vsf_wifi.h"
24
25#if VSF_WIFI_USE_RT28XX == ENABLED
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/*============================ TYPES =========================================*/
32
33/*
34 * RT28xx chip-private bus operations.
35 *
36 * The first member MUST be vsf_wifi_reg_bus_t so the generic wifi layer can
37 * treat the structure as a plain register bus. The USB bus driver embeds the
38 * standard register ops here and appends RT28xx-specific primitives (e.g. the
39 * USB ep0 vendor_request used for USB_DEVICE_MODE) after the shared part.
40 */
47
48/*============================ GLOBAL VARIABLES ==============================*/
49
50/*
51 * Firmware blob declared by chip/rt28xx/vsf_wifi_rt2870_firmware.c (weak
52 * stub). Link a strong override to ship the real rt2870.bin; the rt28xx
53 * chip driver uses size > 0 as the trigger to invoke run_blob during
54 * firmware_load.
55 */
56extern const uint8_t __rt2870_firmware_data[];
58
59/*============================ LOGGING HELPERS ===============================*/
60
61#if VSF_WIFI_CFG_CHIP_RT28XX_LOG_LEVEL >= 1
62# define vsf_wifi_chip_rt28xx_trace_error(...) vsf_trace_error(__VA_ARGS__)
63#else
64# define vsf_wifi_chip_rt28xx_trace_error(...) ((void)0)
65#endif
66
67#if VSF_WIFI_CFG_CHIP_RT28XX_LOG_LEVEL >= 2
68# define vsf_wifi_chip_rt28xx_trace_info(...) vsf_trace_info(__VA_ARGS__)
69#else
70# define vsf_wifi_chip_rt28xx_trace_info(...) ((void)0)
71#endif
72
73#if VSF_WIFI_CFG_CHIP_RT28XX_LOG_LEVEL >= 4
74# define vsf_wifi_chip_rt28xx_trace_debug(...) vsf_trace_info(__VA_ARGS__)
75#else
76# define vsf_wifi_chip_rt28xx_trace_debug(...) ((void)0)
77#endif
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif // VSF_WIFI_USE_RT28XX
84#endif // __VSF_WIFI_RT28XX_H__
vsf_err_t
Definition __type.h:42
unsigned short uint16_t
Definition stdint.h:7
unsigned uint32_t
Definition stdint.h:9
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_wifi.h:214
Definition vsf_wifi_rt28xx.h:41
vsf_wifi_reg_bus_t base
Definition vsf_wifi_rt28xx.h:42
vsf_err_t(* vendor_request)(vsf_wifi_t *wifi, uint8_t request, uint16_t value, uint16_t index, vsf_wifi_done_t done)
Definition vsf_wifi_rt28xx.h:43
Definition vsf_wifi_priv.h:57
vk_av_control_value_t value
Definition vsf_audio.h:171
void(* vsf_wifi_done_t)(vsf_wifi_t *wifi, vsf_err_t err)
Definition vsf_wifi.h:123
const uint8_t __rt2870_firmware_data[]
Definition vsf_wifi_rt2870_firmware.c:64
const uint32_t __rt2870_firmware_size
Definition vsf_wifi_rt2870_firmware.c:67
struct vsf_wifi_rt28xx_bus_ops_t vsf_wifi_rt28xx_bus_ops_t
Generated from commit: vsfteam/vsf@9e2cb73