00001
00002
00003
00004
00005
00006
00007
00008 #ifndef HDAPS_H
00009 #define HDAPS_H
00010
00011 #ifdef HAVE_CONFIG_H
00012 #include "config.h"
00013 #endif
00014
00015 #include <sys/types.h>
00016 #include <sys/fcntl.h>
00017 #include <stdio.h>
00018 #include <string.h>
00019 #include <unistd.h>
00020
00021 #include <libplayercore/playercore.h>
00022
00023 #define SYSFS_HDAPS_POSITION "/sys/devices/platform/hdaps/position"
00024
00025 class HDAPS : public Driver
00026 {
00027 private:
00028
00029 player_devaddr_t joystick_id;
00030 player_joystick_data_t data, prev_data;
00031
00032
00033 void PutData(void);
00034
00035 public:
00036 HDAPS(ConfigFile *cf, int section);
00037 ~HDAPS(void);
00038
00039
00040 void Main();
00041 int Setup();
00042 int Shutdown();
00043
00044
00045 int Subscribe(player_devaddr_t id);
00046 int Unsubscribe(player_devaddr_t id);
00047 int ProcessMessage(MessageQueue *queue, player_msghdr *msghdr, void *data);
00048 };
00049
00050 #endif