![]() |
nRF5 SDK
v16.0.0
|
| Choose documentation: | nRF5 SDK | S112 SoftDevice API | S113 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
nRF52840 only: Module with types, definitions, and API used by the HID mouse class. More...
Modules | |
| USB HID mouse descriptors | |
| nRF52840 only: Module with types, definitions, and API used by the HID mouse class. | |
| USB HID mouse internals | |
| nRF52840 only: Module with types, definitions, and API used by the HID mouse class. | |
| USB HID mouse configuration | |
Data Structures | |
| struct | app_usbd_hid_mouse_t |
| HID mouse class instance type. More... | |
Macros | |
| #define | APP_USBD_HID_MOUSE_GLOBAL_DEF(instance_name,interface_number,endpoint,bcnt,user_ev_handler,subclass_boot) |
| Global definition macro of app_usbd_hid_mouse_t class. More... | |
Functions | |
| static app_usbd_class_inst_t const * | app_usbd_hid_mouse_class_inst_get (app_usbd_hid_mouse_t const *p_mouse) |
| Helper function to get class instance from HID mouse internals. More... | |
| static app_usbd_hid_mouse_t const * | app_usbd_hid_mouse_class_get (app_usbd_class_inst_t const *p_inst) |
| Helper function to get HID mouse from base class instance. More... | |
| ret_code_t | app_usbd_hid_mouse_x_move (app_usbd_hid_mouse_t const *p_mouse, int8_t offset) |
| Move mouse X axis. More... | |
| ret_code_t | app_usbd_hid_mouse_y_move (app_usbd_hid_mouse_t const *p_mouse, int8_t offset) |
| Move mouse Y axis. More... | |
| ret_code_t | app_usbd_hid_mouse_scroll_move (app_usbd_hid_mouse_t const *p_mouse, int8_t offset) |
| Move mouse scroll. More... | |
| ret_code_t | app_usbd_hid_mouse_button_state (app_usbd_hid_mouse_t const *p_mouse, uint8_t button_id, bool state) |
| Set mouse button state. More... | |
| ret_code_t | hid_mouse_on_set_protocol (app_usbd_hid_mouse_t const *p_mouse, app_usbd_hid_user_event_t ev) |
| Function handling SET_PROTOCOL command. More... | |
| ret_code_t | hid_mouse_clear_buffer (app_usbd_class_inst_t const *p_inst) |
| Function that clears HID mouse buffers and sends an empty report. More... | |
nRF52840 only: Module with types, definitions, and API used by the HID mouse class.
| #define APP_USBD_HID_MOUSE_GLOBAL_DEF | ( | instance_name, | |
| interface_number, | |||
| endpoint, | |||
| bcnt, | |||
| user_ev_handler, | |||
| subclass_boot | |||
| ) |
Global definition macro of app_usbd_hid_mouse_t class.
| instance_name | Name of global instance. |
| interface_number | Unique interface number. |
| endpoint | Input endpoint (nrf_drv_usbd_ep_t). |
| bcnt | Mouse button count (from 1 to 8). |
| user_ev_handler | User event handler (optional). |
| subclass_boot | Subclass boot (app_usbd_hid_subclass_t). |
| ret_code_t app_usbd_hid_mouse_button_state | ( | app_usbd_hid_mouse_t const * | p_mouse, |
| uint8_t | button_id, | ||
| bool | state | ||
| ) |
Set mouse button state.
| [in] | p_mouse | Mouse instance (declared by APP_USBD_HID_MOUSE_GLOBAL_DEF). |
| [in] | button_id | Button number (0...7). |
| [in] | state | Button state: true -> PRESSED, false -> RELEASED. |
|
inlinestatic |
Helper function to get HID mouse from base class instance.
| [in] | p_inst | Base class instance. |
|
inlinestatic |
Helper function to get class instance from HID mouse internals.
| [in] | p_mouse | Mouse instance (declared by APP_USBD_HID_MOUSE_GLOBAL_DEF). |
| ret_code_t app_usbd_hid_mouse_scroll_move | ( | app_usbd_hid_mouse_t const * | p_mouse, |
| int8_t | offset | ||
| ) |
Move mouse scroll.
| [in] | p_mouse | Mouse instance (declared by APP_USBD_HID_MOUSE_GLOBAL_DEF). |
| [in] | offset | Relative mouse position: allowed full int8_t range. |
| ret_code_t app_usbd_hid_mouse_x_move | ( | app_usbd_hid_mouse_t const * | p_mouse, |
| int8_t | offset | ||
| ) |
Move mouse X axis.
| [in] | p_mouse | Mouse instance (declared by APP_USBD_HID_MOUSE_GLOBAL_DEF). |
| [in] | offset | Relative mouse position: allowed full int8_t range. |
| ret_code_t app_usbd_hid_mouse_y_move | ( | app_usbd_hid_mouse_t const * | p_mouse, |
| int8_t | offset | ||
| ) |
Move mouse Y axis.
| [in] | p_mouse | Mouse instance (declared by APP_USBD_HID_MOUSE_GLOBAL_DEF). |
| [in] | offset | Relative mouse position: allowed full int8_t range. |
| ret_code_t hid_mouse_clear_buffer | ( | app_usbd_class_inst_t const * | p_inst | ) |
Function that clears HID mouse buffers and sends an empty report.
| [in] | p_inst | Base class instance. |
| ret_code_t hid_mouse_on_set_protocol | ( | app_usbd_hid_mouse_t const * | p_mouse, |
| app_usbd_hid_user_event_t | ev | ||
| ) |
Function handling SET_PROTOCOL command.
| [in] | p_mouse | Mouse instance. |
| [in] | ev | User event. |