Files | |
| file | adb_dev.c |
| file | adb_dev.h |
| file | adb_mouse.c |
| file | adb_mouse.h |
| file | char_mouse.c |
| file | char_mouse.h |
| file | chardev.c |
| file | mouse.h |
| file | mouse_port.h |
| file | mouse_proto.h |
| file | ps2.c |
| PS/2 mouse protocol driver. | |
| file | s3c24xx_ts.c |
| Samsung Samsung S3C24xx on-chip ADC and touch-screen interface driver. | |
Data Structures | |
| struct | ps2packet_t |
Defines | |
| #define | BUFSIZE 3 |
| #define | NAME "s3c24ser" |
| #define | NAME "char_mouse" |
| #define | NAME "mouse" |
| #define | NAME "adb_ms" |
| #define | NAMESPACE "hid_in" |
| #define | NAMESPACE "hid_in" |
| #define | NAMESPACE "hid_in" |
| #define | PS2_MOUSE_ACK 0xfa |
| #define | PS2_MOUSE_OUT_INIT 0xf4 |
Enumerations | |
| enum | mouse_notif_t |
Functions | |
| static void | adb_dev_events (ipc_callid_t iid, ipc_call_t *icall) |
| int | adb_dev_init (void) |
| static int | bit9toint (int sign, unsigned char data) |
| Convert 9-bit 2-complement signed number to integer. | |
| static void | chardev_events (ipc_callid_t iid, ipc_call_t *icall) |
| static void | client_connection (ipc_callid_t iid, ipc_call_t *icall) |
| static int | lin_map_range (int v, int i0, int i1, int o0, int o1) |
| Map integer from one range to another range in a linear fashion. | |
| int | main (int argc, char *argv[]) |
| Main entry point. | |
| int | main (int argc, char **argv) |
| static void | mouse_ev_btn (int button, int press) |
| static void | mouse_ev_move (int dx, int dy) |
| void | mouse_handle_byte (int byte) |
| void | mouse_handle_data (uint16_t data) |
| int | mouse_port_init (void) |
| void | mouse_port_reclaim (void) |
| void | mouse_port_write (uint8_t data) |
| void | mouse_port_yield (void) |
| int | mouse_proto_init (void) |
| void | mouse_proto_parse_byte (int data) |
| Process mouse data. | |
| static void | s3c24xx_ts_connection (ipc_callid_t iid, ipc_call_t *icall) |
| Handle mouse client connection. | |
| static void | s3c24xx_ts_convert_samples (int smp0, int smp1, int *x, int *y) |
| Convert sampled data to screen coordinates. | |
| static void | s3c24xx_ts_eoc (s3c24xx_ts_t *ts) |
| Handle end-of-conversion interrupt. | |
| static int | s3c24xx_ts_init (s3c24xx_ts_t *ts) |
| Initialize S3C24xx touchscreen interface. | |
| static void | s3c24xx_ts_irq_handler (ipc_callid_t iid, ipc_call_t *call) |
| Handle touchscreen interrupt. | |
| static void | s3c24xx_ts_pen_down (s3c24xx_ts_t *ts) |
| Handle pen-down interrupt. | |
| static void | s3c24xx_ts_pen_up (s3c24xx_ts_t *ts) |
| Handle pen-up interrupt. | |
| static void | s3c24xx_ts_wait_for_int_mode (s3c24xx_ts_t *ts, ts_updn_t updn) |
| Switch interface to wait for interrupt mode. | |
Variables | |
| static bool | b1_pressed |
| static bool | b2_pressed |
| static ps2packet_t | buf |
| static int | bufpos = 0 |
| int | client_phone = -1 |
| static int | client_phone = -1 |
| static int | dev_phone |
| static int | dev_phone |
| static int | leftbtn = 0 |
| static int | middlebtn = 0 |
| static int | rightbtn = 0 |
| static s3c24xx_ts_t * | ts |
| S3C24xx touchscreen instance structure. | |
| static irq_cmd_t | ts_irq_cmds [] |
| static irq_code_t | ts_irq_code |
This driver handles a mouse connected to Apple Desktop Bus speaking the Apple classic protocol. It connects to an ADB driver.
This is a common driver for mice attached to simple character devices (PS/2 mice, serial mice).
| static int lin_map_range | ( | int | v, | |
| int | i0, | |||
| int | i1, | |||
| int | o0, | |||
| int | o1 | |||
| ) | [static] |
Map integer from one range to another range in a linear fashion.
i0 < i1 is required. i0 is mapped to o0, i1 to o1. If o1 < o0, then the mapping will be descending. If v is outside of [i0, i1], it is clamped.
| v | Value to map. | |
| i0 | Lower bound of input range. | |
| i1 | Upper bound of input range. | |
| o0 | First bound of output range. | |
| o1 | Second bound of output range. |
Definition at line 360 of file s3c24xx_ts.c.
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Main entry point.
| [in] | argc | Nmber of arguments in argv vector (ignored). |
| [in] | argv | Cmdline argument vector (ignored). |
Definition at line 82 of file s3c24xx_ts.c.
| static void s3c24xx_ts_eoc | ( | s3c24xx_ts_t * | ts | ) | [static] |
Handle end-of-conversion interrupt.
| ts | Touchscreen instance |
Definition at line 291 of file s3c24xx_ts.c.
| static void s3c24xx_ts_pen_down | ( | s3c24xx_ts_t * | ts | ) | [static] |
Handle pen-down interrupt.
| ts | Touchscreen instance |
Definition at line 253 of file s3c24xx_ts.c.
| static void s3c24xx_ts_pen_up | ( | s3c24xx_ts_t * | ts | ) | [static] |
Handle pen-up interrupt.
| ts | Touchscreen instance |
Definition at line 272 of file s3c24xx_ts.c.
| static void s3c24xx_ts_wait_for_int_mode | ( | s3c24xx_ts_t * | ts, | |
| ts_updn_t | updn | |||
| ) | [static] |
Switch interface to wait for interrupt mode.
In this mode we receive an interrupt when pen goes up/down, depending on updn.
| ts | Touchscreen instance | |
| updn | updn_up to wait for pen up, updn_down to wait for pen down. |
Definition at line 157 of file s3c24xx_ts.c.
1.4.7