summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-12-31 15:51:05 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-12-31 15:51:05 +0100
commit63016ce5c71019de315434de3e91adbf535d4986 (patch)
treeb2368aecbbc790a600f7dfebfaabc8c28fa806b0 /src/device/axis/axis.c
parentb9952b4938da95de07bff748cfd6d2c7e8471796 (diff)
Still working on it...
Diffstat (limited to 'src/device/axis/axis.c')
-rw-r--r--src/device/axis/axis.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/device/axis/axis.c b/src/device/axis/axis.c
new file mode 100644
index 0000000..75afad8
--- /dev/null
+++ b/src/device/axis/axis.c
@@ -0,0 +1,34 @@
+/**** POSIX *******************************************************************/
+#include <string.h>
+
+/**** RELABSD *****************************************************************/
+#include <relabsd/device/axis.h>
+
+/******************************************************************************/
+/**** LOCAL FUNCTIONS *********************************************************/
+/******************************************************************************/
+
+/******************************************************************************/
+/**** EXPORTED FUNCTIONS ******************************************************/
+/******************************************************************************/
+void relabsd_axis_initialize
+(
+ struct relabsd_axis axis [const restrict static 1]
+)
+{
+ (void) memset(axis, 0, sizeof(struct relabsd_axis));
+}
+
+void relabsd_axis_to_absinfo
+(
+ struct relabsd_axis axis [const restrict static 1]
+ struct input_absinfo absinfo [const restrict static 1]
+)
+{
+ absinfo->value = (__s32) 0;
+ absinfo->minimum = (__s32) axis->min;
+ absinfo->maximum = (__s32) axis->max;
+ absinfo->fuzz = (__s32) axis->fuzz;
+ absinfo->flat = (__s32) axis->flat;
+ absinfo->resolution = (__s32) axis->resolution;
+}