nRF Desktop: API documentation
Following are the API elements used by the application.
HID reports
applications/nrf_desktop/configuration/common/hid_report_desc.h
applications/nrf_desktop/configuration/common/hid_report_desc.c
- group nrf_desktop_hid_reports
HID Reports.
Enums
-
enum report_id
Identification numbers of HID reports.
Values:
-
enumerator REPORT_ID_RESERVED
Reserved.
-
enumerator REPORT_ID_MOUSE
Mouse input report.
-
enumerator REPORT_ID_KEYBOARD_KEYS
Keyboard input report.
-
enumerator REPORT_ID_SYSTEM_CTRL
System control input report.
-
enumerator REPORT_ID_CONSUMER_CTRL
Consumer control input report.
-
enumerator REPORT_ID_KEYBOARD_LEDS
Keyboard output report.
-
enumerator REPORT_ID_USER_CONFIG
Config channel feature report.
-
enumerator REPORT_ID_USER_CONFIG_OUT
Config channel output report.
-
enumerator REPORT_ID_VENDOR_IN
Reserved.
-
enumerator REPORT_ID_VENDOR_OUT
Reserved.
-
enumerator REPORT_ID_BOOT_MOUSE
Boot report - mouse.
-
enumerator REPORT_ID_BOOT_KEYBOARD
Boot report - keyboard.
-
enumerator REPORT_ID_COUNT
Number of reports.
-
enumerator REPORT_ID_RESERVED
Variables
-
static const uint8_t input_reports[] = {REPORT_ID_MOUSE, REPORT_ID_KEYBOARD_KEYS, REPORT_ID_SYSTEM_CTRL, REPORT_ID_CONSUMER_CTRL, REPORT_ID_BOOT_MOUSE, REPORT_ID_BOOT_KEYBOARD,}
Input reports map.
-
static const uint8_t output_reports[] = {REPORT_ID_KEYBOARD_LEDS,}
Output reports map.
-
const uint8_t hid_report_desc[]
-
const size_t hid_report_desc_size
-
enum report_id
LED states
applications/nrf_desktop/configuration/common/led_state.h
applications/nrf_desktop/src/modules/led_state.c
- group nrf_desktop_led_state
LED State.
Enums
-
enum led_system_state
System states represented by LED.
Values:
-
enumerator LED_SYSTEM_STATE_IDLE
Device is idle.
-
enumerator LED_SYSTEM_STATE_CHARGING
Device is charging.
-
enumerator LED_SYSTEM_STATE_ERROR
Device in error state.
-
enumerator LED_SYSTEM_STATE_COUNT
Number of system states.
-
enumerator LED_SYSTEM_STATE_IDLE
-
enum led_peer_state
Peer states represented by LED.
Values:
-
enumerator LED_PEER_STATE_DISCONNECTED
Peer is disconnected.
-
enumerator LED_PEER_STATE_CONNECTED
Peer is connected.
-
enumerator LED_PEER_STATE_PEER_SEARCH
Device searches for peer.
-
enumerator LED_PEER_STATE_CONFIRM_SELECT
Device waits for user to confirm peer switch.
-
enumerator LED_PEER_STATE_CONFIRM_ERASE
Device waits for user to confirm bond erase.
-
enumerator LED_PEER_STATE_ERASE_ADV
Device searches for new peer before bond erase.
-
enumerator LED_PEER_STATE_COUNT
Number of peer states.
-
enumerator LED_PEER_STATE_DISCONNECTED
-
enum led_system_state
USB events
applications/nrf_desktop/src/events/usb_event.h
applications/nrf_desktop/src/modules/usb_state.c
- group nrf_desktop_usb_event
USB Event.
File defines a set of events used to transmit the information about USB state between the application modules.
Enums
-
enum usb_state
Peer states.
Values:
-
enumerator USB_STATE_DISCONNECTED
Cable is not attached.
-
enumerator USB_STATE_POWERED
Cable attached but no communication.
-
enumerator USB_STATE_ACTIVE
Cable attached and data is exchanged.
-
enumerator USB_STATE_SUSPENDED
Cable attached but port is suspended.
-
enumerator USB_STATE_COUNT
Number of states.
-
enumerator USB_STATE_DISCONNECTED
-
struct usb_state_event
- #include <usb_event.h>
USB state event.
-
enum usb_state