VSF Documented
Data Structures | Macros | Functions | Variables
vsf_usbd_HID.h File Reference
#include "component/usb/vsf_usb_cfg.h"
#include "../../../common/class/HID/vsf_usb_HID.h"
#include "./vsf_usbd_HID_desc.h"
#include "utilities/ooc_class.h"
#include "./vsf_usbd_hidmsc.h"

Go to the source code of this file.

Data Structures

class  vk_usbd_hid_report_t
 
class  vk_usbd_hid_t
 

Macros

#define USB_HID_PARAM(__IN_EP, __OUT_EP, __REPORT_NUM, __REPORTS, __HAS_REPORT_ID, __DESC_NUM, __DESC, __RX_BUFF, __RX_BUFF_SIZE, __NOTIFY_EDA, __NOTIFIER)
 
#define USB_HID_IFS_NUM   1
 
#define USB_HID_IFS(__HID_PARAM)   USB_IFS(&vk_usbd_hid, &(__HID_PARAM))
 
#define __usbd_hid_desc(__name, __ifs, __i_func, __subclass, __protocol, __version_bcd, __country_code, __report_desc_len, __ep_in, __ep_in_size, __ep_in_interval, __ep_out, __ep_out_size, __ep_out_interval)
 
#define __usbd_hid_desc_iad(__name, __ifs, __i_func, __subclass, __protocol, __version_bcd, __country_code, __report_desc_len, __ep_in, __ep_in_size, __ep_in_interval, __ep_out, __ep_out_size, __ep_out_interval)
 
#define __usbd_hid_func(__name, __func_id, __in_ep, __out_ep, __out_ep_size, __report_num, __reports, __has_report_id, __report_desc, __report_desc_len, __notify_eda, __notifier)
 
#define __usbd_hid_ifs(__name, __func_id)    USB_HID_IFS(__##__name##_HID##__func_id)
 
#define usbd_hid_desc(__name, __ifs, __i_func, __subclass, __protocol, __version_bcd, __country_code, __report_desc_len, __ep_in, __ep_in_size, __ep_in_interval, __ep_out, __ep_out_size, __ep_out_interval)
 
#define usbd_hid_desc_iad(__name, __ifs, __i_func, __subclass, __protocol, __version_bcd, __country_code, __report_desc_len, __ep_in, __ep_in_size, __ep_in_interval, __ep_out, __ep_out_size, __ep_out_interval)
 
#define usbd_hid_func(__name, __func_id, __in_ep, __out_ep, __out_ep_size, __report_num, __reports, __has_report_id, __report_desc, __report_desc_size, __notify_eda, __notifier)
 
#define usbd_hid_ifs(__name, __func_id)    __usbd_hid_ifs(__name, __func_id)
 
#define VSF_USBD_DESC_HID_REPORT(__PTR, __SIZE)    {USB_HID_DT_REPORT, 0, 0, (__SIZE), (uint8_t*)(__PTR)}
 
#define VSF_USBD_HID_REPORT(__TYPE, __ID, __BUFFER, __SIZE, __IDLE)    {(__TYPE), {(__BUFFER), (__SIZE)}, (__ID), (__IDLE)}
 

Functions

bool vk_usbd_hid_in_report_can_update (vk_usbd_hid_report_t *report)
 
void vk_usbd_hid_in_report_changed (vk_usbd_hid_t *hid, vk_usbd_hid_report_t *report)
 
void vk_usbd_hid_out_report_processed (vk_usbd_hid_t *hid, vk_usbd_hid_report_t *report)
 

Variables

const vk_usbd_class_op_t vk_usbd_hid
 

Macro Definition Documentation

◆ USB_HID_PARAM

#define USB_HID_PARAM (   __IN_EP,
  __OUT_EP,
  __REPORT_NUM,
  __REPORTS,
  __HAS_REPORT_ID,
  __DESC_NUM,
  __DESC,
  __RX_BUFF,
  __RX_BUFF_SIZE,
  __NOTIFY_EDA,
  __NOTIFIER 
)
Value:
.ep_out = (__OUT_EP), \
.ep_in = (__IN_EP), \
.num_of_report = (__REPORT_NUM), \
.reports = (__REPORTS), \
.has_report_id = (__HAS_REPORT_ID), \
.desc_num = (__DESC_NUM), \
.desc = (vk_usbd_desc_t *)(__DESC), \
.rx_buffer.buffer = (__RX_BUFF), \
.rx_buffer.size = (__RX_BUFF_SIZE), \
.notify_eda = (__NOTIFY_EDA), \
.notifier = (__NOTIFIER),
Definition vsf_usbd.h:379
vk_input_notifier_t notifier
Definition vsf_xboot.c:31

◆ USB_HID_IFS_NUM

#define USB_HID_IFS_NUM   1

◆ USB_HID_IFS

#define USB_HID_IFS (   __HID_PARAM)    USB_IFS(&vk_usbd_hid, &(__HID_PARAM))

◆ __usbd_hid_desc

#define __usbd_hid_desc (   __name,
  __ifs,
  __i_func,
  __subclass,
  __protocol,
  __version_bcd,
  __country_code,
  __report_desc_len,
  __ep_in,
  __ep_in_size,
  __ep_in_interval,
  __ep_out,
  __ep_out_size,
  __ep_out_interval 
)
Value:
USB_DESC_HID((__ifs), 4 + (__i_func), (__subclass), (__protocol), \
(__version_bcd), (__country_code), (__report_desc_len), \
(__ep_in), (__ep_in_size), (__ep_in_interval), \
(__ep_out), (__ep_out_size), (__ep_out_interval) \
)
#define USB_DESC_HID(__IFS, __I_FUNC, __SUBCLASS, __PROTOCOL, __VERSION_BCD, __COUNTRY_CODE, __REPORT_DESC_LEN, __EP_IN, __EP_IN_SIZE, __EP_IN_INTERVAL, __EP_OUT, __EP_OUT_SIZE, __EP_OUT_INTERVAL)
Definition vsf_usbd_HID_desc.h:36

◆ __usbd_hid_desc_iad

#define __usbd_hid_desc_iad (   __name,
  __ifs,
  __i_func,
  __subclass,
  __protocol,
  __version_bcd,
  __country_code,
  __report_desc_len,
  __ep_in,
  __ep_in_size,
  __ep_in_interval,
  __ep_out,
  __ep_out_size,
  __ep_out_interval 
)
Value:
USB_DESC_HID_IAD((__ifs), 4 + (__i_func), (__subclass), (__protocol),\
(__version_bcd), (__country_code), (__report_desc_len), \
(__ep_in), (__ep_in_size), (__ep_in_interval), \
(__ep_out), (__ep_out_size), (__ep_out_interval) \
)
#define USB_DESC_HID_IAD(__IFS, __I_FUNC, __SUBCLASS, __PROTOCOL, __VERSION_BCD, __COUNTRY_CODE, __REPORT_DESC_LEN, __EP_IN, __EP_IN_SIZE, __EP_IN_INTERVAL, __EP_OUT, __EP_OUT_SIZE, __EP_OUT_INTERVAL)
Definition vsf_usbd_HID_desc.h:52

◆ __usbd_hid_func

#define __usbd_hid_func (   __name,
  __func_id,
  __in_ep,
  __out_ep,
  __out_ep_size,
  __report_num,
  __reports,
  __has_report_id,
  __report_desc,
  __report_desc_len,
  __notify_eda,
  __notifier 
)
Value:
uint8_t __##__name##_HID##_rx_buffer[__out_ep_size]; \
const vk_usbd_desc_t __##__name##_HID##__desc[1] = { \
VSF_USBD_DESC_HID_REPORT((__report_desc), (__report_desc_len)), \
}; \
vk_usbd_hid_t __##__name##_HID##__func_id = { \
USB_HID_PARAM((__in_ep), (__out_ep), \
(__report_num), (__reports), (__has_report_id), \
dimof(__##__name##_HID##__desc), (__##__name##_HID##__desc),\
__##__name##_HID##_rx_buffer, __out_ep_size, \
__notify_eda, __notifier) \
};
#define dimof(__arr)
Definition __type.h:155
Definition vsf_usbd_HID.h:162
#define __name
Definition hci_transport_aic8800.c:552
unsigned char uint8_t
Definition stdint.h:5

◆ __usbd_hid_ifs

#define __usbd_hid_ifs (   __name,
  __func_id 
)     USB_HID_IFS(__##__name##_HID##__func_id)

◆ usbd_hid_desc

#define usbd_hid_desc (   __name,
  __ifs,
  __i_func,
  __subclass,
  __protocol,
  __version_bcd,
  __country_code,
  __report_desc_len,
  __ep_in,
  __ep_in_size,
  __ep_in_interval,
  __ep_out,
  __ep_out_size,
  __ep_out_interval 
)
Value:
__usbd_hid_desc(__name, (__ifs), (__i_func), \
(__subclass), (__protocol), \
(__version_bcd), (__country_code), (__report_desc_len), \
(__ep_in), (__ep_in_size), (__ep_in_interval), \
(__ep_out), (__ep_out_size), (__ep_out_interval))
#define __usbd_hid_desc(__name, __ifs, __i_func, __subclass, __protocol, __version_bcd, __country_code, __report_desc_len, __ep_in, __ep_in_size, __ep_in_interval, __ep_out, __ep_out_size, __ep_out_interval)
Definition vsf_usbd_HID.h:66

◆ usbd_hid_desc_iad

#define usbd_hid_desc_iad (   __name,
  __ifs,
  __i_func,
  __subclass,
  __protocol,
  __version_bcd,
  __country_code,
  __report_desc_len,
  __ep_in,
  __ep_in_size,
  __ep_in_interval,
  __ep_out,
  __ep_out_size,
  __ep_out_interval 
)
Value:
__usbd_hid_desc_iad(__name, (__ifs), (__i_func), \
(__subclass), (__protocol), \
(__version_bcd), (__country_code), (__report_desc_len), \
(__ep_in), (__ep_in_size), (__ep_in_interval), \
(__ep_out), (__ep_out_size), (__ep_out_interval))
#define __usbd_hid_desc_iad(__name, __ifs, __i_func, __subclass, __protocol, __version_bcd, __country_code, __report_desc_len, __ep_in, __ep_in_size, __ep_in_interval, __ep_out, __ep_out_size, __ep_out_interval)
Definition vsf_usbd_HID.h:75

◆ usbd_hid_func

#define usbd_hid_func (   __name,
  __func_id,
  __in_ep,
  __out_ep,
  __out_ep_size,
  __report_num,
  __reports,
  __has_report_id,
  __report_desc,
  __report_desc_size,
  __notify_eda,
  __notifier 
)
Value:
__usbd_hid_func(__name, __func_id, \
(__in_ep), (__out_ep), (__out_ep_size), \
(__report_num), (__reports), (__has_report_id), \
(__report_desc), (__report_desc_size), \
(__notify_eda), (__notifier))
#define __usbd_hid_func(__name, __func_id, __in_ep, __out_ep, __out_ep_size, __report_num, __reports, __has_report_id, __report_desc, __report_desc_len, __notify_eda, __notifier)
Definition vsf_usbd_HID.h:85

◆ usbd_hid_ifs

#define usbd_hid_ifs (   __name,
  __func_id 
)     __usbd_hid_ifs(__name, __func_id)

◆ VSF_USBD_DESC_HID_REPORT

#define VSF_USBD_DESC_HID_REPORT (   __PTR,
  __SIZE 
)     {USB_HID_DT_REPORT, 0, 0, (__SIZE), (uint8_t*)(__PTR)}

◆ VSF_USBD_HID_REPORT

#define VSF_USBD_HID_REPORT (   __TYPE,
  __ID,
  __BUFFER,
  __SIZE,
  __IDLE 
)     {(__TYPE), {(__BUFFER), (__SIZE)}, (__ID), (__IDLE)}

Function Documentation

◆ vk_usbd_hid_in_report_can_update()

bool vk_usbd_hid_in_report_can_update ( vk_usbd_hid_report_t report)
extern

◆ vk_usbd_hid_in_report_changed()

void vk_usbd_hid_in_report_changed ( vk_usbd_hid_t hid,
vk_usbd_hid_report_t report 
)
extern

◆ vk_usbd_hid_out_report_processed()

void vk_usbd_hid_out_report_processed ( vk_usbd_hid_t hid,
vk_usbd_hid_report_t report 
)
extern

Variable Documentation

◆ vk_usbd_hid

const vk_usbd_class_op_t vk_usbd_hid
extern