Input devices
Implementation internals » Device handling

Input device scan functions. More...

## Macros

#define | INP_NAME "N: Name="
#define | INP_HANDLERS "H: Handlers="
#define | INP_KEY "B: KEY="
#define | INP_REL "B: REL="
#define | INP_ABS "B: ABS="

## Functions

static void | get_input_devices (hd_data_t *hd_data)
static char * | all_bits (char *str)
static int | test_bit (const char *str, unsigned bit)
void | hd_scan_input (hd_data_t *hd_data)
void | add_joystick_details (hd_data_t *hd_data, hd_t *h, const char *key, const char *abso)

## Detailed Description

Input device scan functions.

## Macro Definition Documentation

## INP_ABS

#define INP_ABS "B: ABS="

Referenced by get_input_devices().

## INP_HANDLERS

#define INP_HANDLERS "H: Handlers="

Referenced by get_input_devices().

## INP_KEY

#define INP_KEY "B: KEY="

Referenced by get_input_devices().

## INP_NAME

#define INP_NAME "N: Name="

Referenced by get_input_devices().

## INP_REL

#define INP_REL "B: REL="

Referenced by get_input_devices().

## Function Documentation

## add_joystick_details()

void add_joystick_details | ( | hd_data_t * | hd_data,
|  | hd_t * | h,
|  | const char * | key,
|  | const char * | abso )

References ADD2LOG, joystick_s::axes, joystick_s::buttons, hd_detail_joystick_t::data, s_hd_t::detail, free_hd_detail(), hd_data, hd_detail_joystick, hd_detail_t::joystick, new_mem(), test_bit(), and hd_detail_t::type.

Referenced by get_input_devices().

## all_bits()

char * all_bits | ( | char * | str | ) |

static

References free_mem(), free_str_list(), hd_split(), s_str_list_t::next, s_str_list_t::str, and str_printf().

Referenced by get_input_devices().

## get_input_devices()

void get_input_devices | ( | hd_data_t * | hd_data | ) |

static

References ADD2LOG, add_hd_entry(), add_joystick_details(), add_str_list(), all_bits(), s_hd_t::base_class, bc_joystick, bc_keyboard, bc_mouse, s_hd_t::bus, bus_adb, bus_gameport, bus_ps2, canon_str(), s_hd_t::compat_device, s_hd_t::compat_vendor, DEV_MICE, s_hd_t::device, free_mem(), free_str_list(), hd_data, hd_set_hw_class(), hd_split(), hw_joystick, hw_mouse, hd_id_t::id, INP_ABS, INP_HANDLERS, INP_KEY, INP_NAME, INP_REL, input(), hd_dev_num_t::major, MAKE_ID, hd_dev_num_t::minor, hd_id_t::name, new_str(), s_hd_t::next, s_str_list_t::next, read_file(), sc_keyboard_kbd, sc_mou_bus, sc_mou_ps2, sc_mou_usb, search_str_list(), s_str_list_t::str, str_printf(), s_hd_t::sub_class, TAG_SPECIAL, test_bit(), s_hd_t::unix_dev_name, s_hd_t::unix_dev_name2, s_hd_t::unix_dev_names, s_hd_t::unix_dev_num, s_hd_t::unix_dev_num2, s_hd_t::vendor, and vendor.

Referenced by hd_scan_input().

## hd_scan_input()

void hd_scan_input | ( | hd_data_t * | hd_data | ) |

References get_input_devices(), hd_data, hd_probe_feature(), load_module(), mod_input, pr_input, PROGRESS, and remove_hd_entries().

Referenced by hd_scan_no_hal().

## test_bit()

int test_bit | ( | const char * | str,
|  | unsigned | bit )

static

Referenced by add_joystick_details(), and get_input_devices().