nRF52840 only: Module with types, definitions, and API used by the HID keyboard class. More...
Modules |
|
| USB HID keyboard descriptors | |
|
nRF52840 only:
Module with types, definitions, and API used by the HID keyboard class.
|
|
| USB HID keyboard configuration | |
| USB HID keyboard internals | |
|
nRF52840 only:
Module with types, definitions, and API used by the HID keyboard class.
|
|
Data Structures |
|
| struct | app_usbd_hid_kbd_t |
|
HID keyboard class instance type.
More...
|
|
Macros |
|
| #define | APP_USBD_HID_KBD_GLOBAL_DEF (instance_name, interface_number, endpoint, user_ev_handler) |
|
Global definition of
app_usbd_hid_kbd_t
class.
More...
|
|
Functions |
|
|
static
app_usbd_class_inst_t
const * |
app_usbd_hid_kbd_class_inst_get ( app_usbd_hid_kbd_t const *p_kbd) |
|
Helper function to get class instance from HID keyboard internals.
More...
|
|
| static app_usbd_hid_kbd_t const * | app_usbd_hid_kbd_class_get ( app_usbd_class_inst_t const *p_inst) |
|
Helper function to get HID keyboard from base class instance.
More...
|
|
| ret_code_t | app_usbd_hid_kbd_modifier_state_set ( app_usbd_hid_kbd_t const *p_kbd, app_usbd_hid_kbd_modifier_t modifier, bool state) |
|
Set HID keyboard modifier state.
More...
|
|
| ret_code_t | app_usbd_hid_kbd_key_control ( app_usbd_hid_kbd_t const *p_kbd, app_usbd_hid_kbd_codes_t key, bool press) |
|
Press/release HID keyboard key.
More...
|
|
| bool | app_usbd_hid_kbd_led_state_get ( app_usbd_hid_kbd_t const *p_kbd, app_usbd_hid_kbd_led_t led) |
|
HID Keyboard LEDs state get.
More...
|
|
Detailed Description
nRF52840 only: Module with types, definitions, and API used by the HID keyboard class.
Macro Definition Documentation
| #define APP_USBD_HID_KBD_GLOBAL_DEF | ( | instance_name, | |
| interface_number, | |||
| endpoint, | |||
| user_ev_handler | |||
| ) |
Global definition of app_usbd_hid_kbd_t class.
- Parameters
-
instance_name Name of global instance interface_number Unique interface index endpoint Input endpoint ( nrf_drv_usbd_ep_t ) user_ev_handler User event handler (optional)
Example class definition:
Enumeration Type Documentation
HID keyboard codes.
HID keyboard modifier.
Function Documentation
|
inline static |
Helper function to get HID keyboard from base class instance.
- Parameters
-
[in] p_inst Base class instance
- Returns
- HID keyboard class handle
|
inline static |
Helper function to get class instance from HID keyboard internals.
- Parameters
-
[in] p_kbd Keyboard instance (declared by APP_USBD_HID_KBD_GLOBAL_DEF )
- Returns
- Base class instance
| ret_code_t app_usbd_hid_kbd_key_control | ( | app_usbd_hid_kbd_t const * | p_kbd , |
| app_usbd_hid_kbd_codes_t | key , | ||
| bool | press | ||
| ) |
Press/release HID keyboard key.
- Parameters
-
[in] p_kbd Keyboard instance (declared by APP_USBD_HID_KBD_GLOBAL_DEF ) [in] key Keyboard key code [in] press True -> key press, false -> release
- Returns
- Standard error code
| bool app_usbd_hid_kbd_led_state_get | ( | app_usbd_hid_kbd_t const * | p_kbd , |
| app_usbd_hid_kbd_led_t | led | ||
| ) |
HID Keyboard LEDs state get.
- Parameters
-
[in] p_kbd Keyboard instance (declared by APP_USBD_HID_KBD_GLOBAL_DEF ) [in] led LED code
- Returns
- true if LED is set, false otherwise
| ret_code_t app_usbd_hid_kbd_modifier_state_set | ( | app_usbd_hid_kbd_t const * | p_kbd , |
| app_usbd_hid_kbd_modifier_t | modifier , | ||
| bool | state | ||
| ) |
Set HID keyboard modifier state.
- Parameters
-
[in] p_kbd Keyboard instance (declared by APP_USBD_HID_KBD_GLOBAL_DEF ) [in] modifier Type of modifier [in] state State, true active, false inactive
- Returns
- Standard error code