From: bruceperens Date: Fri, 18 Apr 2014 02:55:30 +0000 (+0000) Subject: Begin to create the Linux evdev driver. X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=c07237b79b295f006c54864230c8a31254335fb4;p=freetel-svn-tracking.git Begin to create the Linux evdev driver. git-svn-id: https://svn.code.sf.net/p/freetel/code@1499 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/freedv-server/source/platform/linux/evdev.cpp b/freedv-server/source/platform/linux/evdev.cpp new file mode 100644 index 00000000..d23bb5dd --- /dev/null +++ b/freedv-server/source/platform/linux/evdev.cpp @@ -0,0 +1,21 @@ +#include "evdev.h" + +const struct EvDev::device_enumeration * +EvDev::enumerate(std::size_t &) +{ + return 0; +} + +const char * const * +EvDev::EnumerateButtonDevices() +{ + return 0; +} + +EvDev::EvDev(const char *) +{ +} + +EvDev::~EvDev() +{ +} diff --git a/freedv-server/source/platform/linux/evdev.h b/freedv-server/source/platform/linux/evdev.h new file mode 100644 index 00000000..3a46be93 --- /dev/null +++ b/freedv-server/source/platform/linux/evdev.h @@ -0,0 +1,33 @@ +#include +#include + +#define BITS_PER_LONG (sizeof(long) * 8) +#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) +#define OFF(x) ((x)%BITS_PER_LONG) +#define BIT(x) (1UL<> OFF(bit)) & 1) + +class EvDev { +private: + + EvDev(const EvDev &); + EvDev & operator =(const EvDev &); + +protected: + struct device_enumeration { + const char * device; + const char * name; + uint8_t event_types[(EV_MAX + 7) / 8]; + }; + + static const device_enumeration * + enumerate(std::size_t & size); + +public: + static const char * const * + EnumerateButtonDevices(); + + EvDev(const char * name); + ~EvDev(); +};