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