Mouse devices
Implementation internals » Device handling

Mouse detection. More...

## Functions

static void | get_serial_mouse (hd_data_t *hd_data)
static void | add_serial_mouse (hd_data_t *hd_data)
static int | _setspeed (int fd, int old, int new, int needtowrite, unsigned short flags)
static void | setspeed (int fd, int new, int needtowrite, unsigned short flags)
static unsigned | chk4id (ser_device_t *mi)
static ser_device_t * | add_ser_mouse_entry (ser_device_t **sm, ser_device_t *new_sm)
static void | dump_ser_mouse_data (hd_data_t *hd_data)
void | hd_scan_mouse (hd_data_t *hd_data)

## Detailed Description

Mouse detection.

Todo
  reset serial lines to old values (cf. modem.c)

## Function Documentation

## _setspeed()

int _setspeed | ( | int | fd,
|  | int | old,
|  | int | new,
|  | int | needtowrite,
|  | unsigned short | flags )

static

Referenced by setspeed().

## add_ser_mouse_entry()

ser_device_t * add_ser_mouse_entry | ( | ser_device_t ** | sm,
|  | ser_device_t * | new_sm )

static

References s_ser_device_t::next.

Referenced by get_serial_mouse().

## add_serial_mouse()

void add_serial_mouse | ( | hd_data_t * | hd_data | ) |

static

References add_hd_entry(), s_hd_t::attached_to, s_hd_t::base_class, bc_mouse, s_hd_t::bus, bus_serial, s_hd_t::compat_device, s_hd_t::compat_vendor, s_ser_device_t::dev_id, s_ser_device_t::dev_name, s_hd_t::device, free_mem(), hd_data, s_ser_device_t::hd_idx, hd_id_t::id, s_ser_device_t::is_mouse, MAKE_ID, hd_id_t::name, name2eisa_id(), new_str(), s_ser_device_t::next, s_ser_device_t::pnp_id, sc_mou_ser, s_hd_t::serial, s_ser_device_t::serial, s_hd_t::sub_class, TAG_EISA, TAG_SPECIAL, s_hd_t::unix_dev_name, s_ser_device_t::user_name, s_ser_device_t::vend, and s_hd_t::vendor.

Referenced by hd_scan_mouse().

## chk4id()

unsigned chk4id | ( | ser_device_t * | mi | ) |

static

References s_ser_device_t::bits, s_ser_device_t::buf, s_ser_device_t::buf_len, s_ser_device_t::garbage, s_ser_device_t::is_mouse, is_pnpinfo(), s_ser_device_t::non_pnp, and s_ser_device_t::pnp.

Referenced by get_serial_mouse().

## dump_ser_mouse_data()

void dump_ser_mouse_data | ( | hd_data_t * | hd_data | ) |

static

References ADD2LOG, s_ser_device_t::bits, s_ser_device_t::buf, s_ser_device_t::buf_len, s_ser_device_t::class_name, s_ser_device_t::dev_id, s_ser_device_t::dev_name, s_ser_device_t::garbage, hd_data, hd_log_hex(), s_ser_device_t::is_mouse, s_ser_device_t::next, s_ser_device_t::non_pnp, s_ser_device_t::pnp, s_ser_device_t::pnp_id, s_ser_device_t::pnp_rev, s_ser_device_t::serial, and s_ser_device_t::user_name.

Referenced by hd_scan_mouse().

## get_serial_mouse()

void get_serial_mouse | ( | hd_data_t * | hd_data | ) |

static

References add_ser_mouse_entry(), s_hd_t::base_class, bc_comm, chk4id(), has_something_attached(), hd_data, hd_id_t::id, s_hd_t::idx, new_mem(), new_str(), s_hd_t::next, sc_com_ser, setspeed(), s_hd_t::tag_s::skip_mouse, s_hd_t::sub_class, s_hd_t::tag, and s_hd_t::unix_dev_name.

Referenced by hd_scan_mouse().

## hd_scan_mouse()

void hd_scan_mouse | ( | hd_data_t * | hd_data | ) |

References add_serial_mouse(), s_ser_device_t::dev_name, dump_ser_mouse_data(), free_mem(), get_serial_mouse(), hd_data, HD_DEB_MOUSE, hd_fork(), hd_fork_done(), hd_move_to_shm(), hd_probe_feature(), hd_shm_clean(), mod_mouse, s_ser_device_t::next, pr_mouse, PROGRESS, and remove_hd_entries().

Referenced by hd_scan_no_hal().

## setspeed()

void setspeed | ( | int | fd,
|  | int | new,
|  | int | needtowrite,
|  | unsigned short | flags )

static

References _setspeed().

Referenced by get_serial_mouse().