1 #ifndef ALPS_H 2 #define ALPS_H 3 4 #include <KernelExport.h> 5 6 #include <touchpad_settings.h> 7 8 #include "movement_maker.h" 9 #include "packet_buffer.h" 10 #include "ps2_dev.h" 11 12 13 typedef struct { 14 ps2_dev* dev; 15 16 sem_id sem; 17 struct packet_buffer* ring_buffer; 18 size_t packet_index; 19 uint8 buffer[PS2_PACKET_ALPS]; 20 uint8 mode; 21 22 uint8 previousZ; 23 TouchpadMovement movementMaker; 24 25 touchpad_settings settings; 26 } alps_cookie; 27 28 29 status_t probe_alps(ps2_dev *dev); 30 31 status_t alps_open(const char *name, uint32 flags, void **_cookie); 32 status_t alps_close(void *_cookie); 33 status_t alps_freecookie(void *_cookie); 34 status_t alps_ioctl(void *_cookie, uint32 op, void *buffer, size_t length); 35 36 int32 alps_handle_int(ps2_dev *dev); 37 void alps_disconnect(ps2_dev *dev); 38 39 extern device_hooks gALPSDeviceHooks; 40 41 42 #endif /* ALPS_H */ 43