Microchip® Advanced Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
USB Device Interface (UDI) for Human

Interface Device (HID) gamepad Class.

Common APIs used by high level application to use this USB class.

See Quick start guide for USB device gamepad.

Modules

 Interface with USB Device Core (UDC)
 Structures and functions required by UDC.
 
 Implementation of UDI HID gamepad
 Class internal implementation.
 
 USB interface descriptors
 The following structures provide predefined USB interface descriptors.
 

Functions

bool udi_hid_gpd_buttons (bool b_state, uint8_t key_id)
 Send events key pressed or released. More...
 
bool udi_hid_gpd_moveX (int8_t pos)
 Move the x axe. More...
 
bool udi_hid_gpd_moveY (int8_t pos)
 Move the y axe. More...
 
bool udi_hid_gpd_throttle_move (int8_t pos)
 Move the throttle. More...
 

bool udi_hid_gpd_buttons ( bool  b_state,
uint8_t  key_id 
)

Send events key pressed or released.

Parameters
key_idID of key
b_stateKey Pressed or released
Returns
1 if function was successfully done, otherwise 0.

References cpu_irq_restore(), cpu_irq_save(), udi_hid_gpd_b_report_valid, udi_hid_gpd_report, and udi_hid_gpd_send_report().

Referenced by zid_report_data_indication().

bool udi_hid_gpd_moveX ( int8_t  pos)

Move the x axe.

Parameters
posSigned value to move
Returns
1 if function was successfully done, otherwise 0.

References cpu_irq_restore(), cpu_irq_save(), pos, udi_hid_gpd_b_report_valid, udi_hid_gpd_report, and udi_hid_gpd_send_report().

Referenced by zid_report_data_indication().

bool udi_hid_gpd_moveY ( int8_t  pos)

Move the y axe.

Parameters
posSigned value to move
Returns
1 if function was successfully done, otherwise 0.

References cpu_irq_restore(), cpu_irq_save(), pos, udi_hid_gpd_b_report_valid, udi_hid_gpd_report, and udi_hid_gpd_send_report().

Referenced by zid_report_data_indication().

bool udi_hid_gpd_throttle_move ( int8_t  pos)

Move the throttle.

Parameters
posSigned value to move
Returns
1 if function was successfully done, otherwise 0.

References cpu_irq_restore(), cpu_irq_save(), pos, udi_hid_gpd_b_report_valid, udi_hid_gpd_report, and udi_hid_gpd_send_report().

Referenced by zid_report_data_indication().