aboutsummaryrefslogtreecommitdiff
path: root/hid-tmt300rs.h
diff options
context:
space:
mode:
Diffstat (limited to 'hid-tmt300rs.h')
-rw-r--r--hid-tmt300rs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hid-tmt300rs.h b/hid-tmt300rs.h
index 3f5af4e..80146ef 100644
--- a/hid-tmt300rs.h
+++ b/hid-tmt300rs.h
@@ -29,8 +29,8 @@
#define FF_EFFECT_PLAYING 3
#define FF_EFFECT_QUEUE_UPDATE 4
-#define CLAMP_VALUE_U16(x) ((unsigned short)((x) > 0xffff ? 0xffff : (x)))
-#define SCALE_VALUE_U16(x, bits) (CLAMP_VALUE_U16(x) >> (16 - bits))
+#undef fixp_sin16
+#define fixp_sin16(v) (((v % 360) > 180)? -(fixp_sin32((v % 360) - 180) >> 16) : fixp_sin32(v) >> 16)
#define JIFFIES2MS(jiffies) ((jiffies) * 1000 / HZ)
spinlock_t lock;