diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-07-18 19:06:09 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-07-18 19:06:09 +0300 |
| commit | c6c0c50a442fb943b0c0f9949e54ad4e6c1203d1 (patch) | |
| tree | eb847acbf90065d16e045797ffcc8a9a65d3a111 /hid-tmt300rs.h | |
| parent | 4216aaa61bfb753158be9e719c59626aeb368231 (diff) | |
| download | hid-tmff2-c6c0c50a442fb943b0c0f9949e54ad4e6c1203d1.tar.gz hid-tmff2-c6c0c50a442fb943b0c0f9949e54ad4e6c1203d1.zip | |
Improved periodic effect
Diffstat (limited to 'hid-tmt300rs.h')
| -rw-r--r-- | hid-tmt300rs.h | 4 |
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; |
