VSF Documented
vsf_usbh_nspro.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_USBH_NSPRO_H__
19#define __VSF_USBH_NSPRO_H__
20
21/*============================ INCLUDES ======================================*/
22
24
25#if VSF_USE_USB_HOST == ENABLED && VSF_USBH_USE_NSPRO == ENABLED
26
28#if VSF_USE_INPUT == ENABLED && VSF_INPUT_USE_NSPRO == ENABLED
30#endif
31
32#if defined(__VSF_USBH_NSPRO_CLASS_IMPLEMENT)
33# undef __VSF_USBH_NSPRO_CLASS_IMPLEMENT
34# define __VSF_CLASS_IMPLEMENT__
35#endif
36#include "utilities/ooc_class.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/*============================ MACROS ========================================*/
43
44#if VSF_USBH_USE_HID != ENABLED
45# error "NSPRO driver need VSF_USBH_USE_HID"
46#endif
47
48/*============================ MACROFIED FUNCTIONS ===========================*/
49/*============================ TYPES =========================================*/
50
56
58 NSPRO_LEFT = 0x01,
60 NSPRO_BOTH = 0x03,
62
64 implement(vk_usbh_hid_teda_t)
65
66 private_member(
67 // gamepad_out_buf should be aligned
69 bool out_idle;
70 vk_usbh_nspro_state_t start_state;
71 uint8_t mac[6];
73
74#if VSF_USE_INPUT == ENABLED && VSF_INPUT_USE_NSPRO == ENABLED
76 // data should be aligned
78#endif
79 )
80};
81
82/*============================ GLOBAL VARIABLES ==============================*/
83
84#if VSF_USE_INPUT == ENABLED && VSF_INPUT_USE_NSPRO == ENABLED
86#endif
87
89
90/*============================ PROTOTYPES ====================================*/
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif // VSF_USE_USB_HOST && VSF_USBH_USE_NSPRO
97#endif // __VSF_USBH_NSPRO_H__
Definition vsf_usbh.h:268
Definition vsf_usbh_HID.h:105
Definition vsf_usbh_nspro.h:63
struct ieee80211_ext_chansw_ie data
Definition ieee80211.h:80
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned char uint8_t
Definition stdint.h:5
Definition ip.h:22
Definition vsf_input.h:67
Definition vsf_usb_nspro.h:110
Definition vsf_usb_nspro.h:116
vk_av_control_type_t type
Definition vsf_audio.h:170
uint32_t vk_input_timestamp_t
Definition vsf_input.h:65
@ GAMEPAD_ID_NUM
Definition vsf_input_gamepad.h:99
const vk_usbh_class_drv_t vk_usbh_nspro_drv
Definition vsf_usbh_nspro.c:79
vk_usbh_nspro_state_t
Definition vsf_usbh_nspro.h:51
@ VSF_USBH_NSPRO_GET_INFO
Definition vsf_usbh_nspro.h:52
@ VSF_USBH_NSPRO_RUNNING
Definition vsf_usbh_nspro.h:54
@ VSF_USBH_NSPRO_HANDSHAKE
Definition vsf_usbh_nspro.h:53
vk_usbh_nspro_type_t
Definition vsf_usbh_nspro.h:57
@ NSPRO_RIGHT
Definition vsf_usbh_nspro.h:59
@ NSPRO_LEFT
Definition vsf_usbh_nspro.h:58
@ NSPRO_BOTH
Definition vsf_usbh_nspro.h:60
const vk_input_item_info_t vk_nspro_usb_gamepad_item_info[GAMEPAD_ID_NUM]
Definition vsf_usbh_nspro.c:53