You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1015 B
47 lines
1015 B
/*
|
|
* types.h
|
|
*
|
|
* Created on: Aug 14, 2008
|
|
* Author: Hedayat Vatankhah <hedayat@grad.com>, 2008.
|
|
*/
|
|
|
|
#ifndef KEYA_TYPES_H_
|
|
#define KEYA_TYPES_H_
|
|
|
|
#define FALSE 0
|
|
#define TRUE 1
|
|
|
|
#ifndef NULL
|
|
#define NULL 0
|
|
#endif
|
|
|
|
/*
|
|
* Defining some basic types. (NOTICE: data type collision is possible. fix this!
|
|
* Maybe using unsigned instead of uint is much better?!
|
|
*/
|
|
typedef unsigned char byte;
|
|
#ifndef __KERNEL__
|
|
typedef unsigned int uint;
|
|
#ifndef __cplusplus
|
|
typedef byte bool;
|
|
#endif
|
|
#endif
|
|
|
|
/** This can be sent to OpenDevice function to open the first available KeyA */
|
|
#define KEYA_FIRST_ID 0
|
|
|
|
typedef int (*PureAttachCallbackProc)(void);
|
|
typedef int (*CallbackProc)(bool attached, void *param);
|
|
typedef int (*CallbackProcWithID)(bool attached, void *param, int keyaid);
|
|
typedef void (*CallbackErrorHandler)(int errnum);
|
|
|
|
typedef struct KeyA2HIDProtocol KeyAHID;
|
|
|
|
/* Only HID class is acceptable by this driver! */
|
|
enum KeyAModuleClass
|
|
{
|
|
_CUSTOME_CLASS,
|
|
_HID_CLASS
|
|
};
|
|
|
|
#endif /* KEYA_TYPES_H_ */
|