nRF5 SDK v17.1.0
Data Structures | Macros | Functions | Variables
USB HID mouse internals

nRF52840 only: Module with types, definitions, and API used by the HID mouse class. More...

Data Structures

struct  app_usbd_hid_mouse_inst_t
 HID mouse part of class instance data. More...
 
struct  app_usbd_hid_mouse_ctx_t
 HID mouse context. More...
 

Macros

#define APP_USBD_HID_MOUSE_CONFIG(iface, ep)   ((iface, ep))
 HID mouse configuration macro. More...
 
#define APP_USBD_HID_MOUSE_INSTANCE_SPECIFIC_DEC   app_usbd_hid_mouse_inst_t inst;
 Specific class constant data for HID mouse class.
 
#define APP_USBD_HID_MOUSE_DATA_SPECIFIC_DEC   app_usbd_hid_mouse_ctx_t ctx;
 Specific class data for HID mouse class.
 
#define APP_USBD_HID_MOUSE_DSC_CONFIG(interface_number, endpoint, rep_desc)
 HID mouse descriptors config macro. More...
 
#define APP_USBD_HID_MOUSE_DEFAULT_INTERVAL   0x01
 Default interval value.
 
#define APP_USBD_HID_MOUSE_INTERVAL(ep)   (APP_USBD_EXTRACT_INTERVAL_FLAG(ep) ? APP_USBD_EXTRACT_INTERVAL_VALUE(ep) : APP_USBD_HID_MOUSE_DEFAULT_INTERVAL)
 
#define APP_USBD_HID_MOUSE_INST_CONFIG(report_buff_in,report_buff_out,user_ev_handler,bcnt,subclass_boot,endpoint_list)
 Configure internal part of HID mouse instance. More...
 
#define APP_USBD_HID_MOUSE_GLOBAL_DEF_INTERNAL(instance_name,interface_number,endpoint,bcnt,user_ev_handler,subclass_boot)
 Global definition of app_usbd_hid_mouse_t class. More...
 

Functions

 APP_USBD_CLASS_FORWARD (app_usbd_hid_mouse)
 Forward declaration of HID mouse class type.
 

Variables

const app_usbd_hid_methods_t app_usbd_hid_mouse_methods
 Public HID mouse interface.
 
const app_usbd_class_methods_t app_usbd_hid_mouse_class_methods
 Public HID mouse class interface.
 

Detailed Description

nRF52840 only: Module with types, definitions, and API used by the HID mouse class.

Macro Definition Documentation

#define APP_USBD_HID_MOUSE_CONFIG (   iface,
  ep 
)    ((iface, ep))

HID mouse configuration macro.

Used by APP_USBD_HID_MOUSE_GLOBAL_DEF.

#define APP_USBD_HID_MOUSE_DSC_CONFIG (   interface_number,
  endpoint,
  rep_desc 
)
Value:
{ \
APP_USBD_HID_MOUSE_INTERFACE_DSC(interface_number) \
APP_USBD_HID_MOUSE_HID_DSC(rep_desc) \
APP_USBD_HID_MOUSE_EP_DSC(endpoint) \
}

HID mouse descriptors config macro.

app_usbd_hid_mouse_inst_t

#define APP_USBD_HID_MOUSE_GLOBAL_DEF_INTERNAL (   instance_name,
  interface_number,
  endpoint,
  bcnt,
  user_ev_handler,
  subclass_boot 
)
Value:
static app_usbd_hid_report_buffer_t CONCAT_2(instance_name, _in)[1]; \
static uint8_t CONCAT_2(instance_name, _ep) = {MACRO_MAP(APP_USBD_HID_MOUSE_INTERVAL,endpoint)}; \
APP_USBD_CLASS_INST_GLOBAL_DEF( \
instance_name, \
app_usbd_hid_mouse, \
APP_USBD_HID_MOUSE_CONFIG(interface_number, endpoint), \
(APP_USBD_HID_MOUSE_INST_CONFIG(CONCAT_2(instance_name, _in), \
NULL, \
user_ev_handler, \
bcnt, \
subclass_boot, \
&CONCAT_2(instance_name, _ep))) \
)

Global definition of app_usbd_hid_mouse_t class.

APP_USBD_HID_MOUSE_GLOBAL_DEF

#define APP_USBD_HID_MOUSE_INST_CONFIG (   report_buff_in,
  report_buff_out,
  user_ev_handler,
  bcnt,
  subclass_boot,
  endpoint_list 
)
Value:
.inst = { \
.hid_inst = APP_USBD_HID_INST_CONFIG(mouse_descs, \
subclass_boot, \
report_buff_in, \
report_buff_out, \
NULL, \
user_ev_handler, \
endpoint_list), \
.button_count = bcnt, \
}

Configure internal part of HID mouse instance.

Parameters
report_buff_inInput report buffers array.
report_buff_outOutput report buffer.
user_ev_handlerUser event handler.
bcntMouse button count.
subclass_bootSubclass boot (app_usbd_hid_subclass_t).
endpoint_listList of endpoints and intervals

Documentation feedback | Developer Zone | Subscribe | Updated