Orxonox
0.0.5 Codename: Arcturus
|
#include "linux/LinuxForceFeedback.h"
#include "OISException.h"
#include <cstdlib>
#include <errno.h>
#include <memory.h>
#include <unistd.h>
#include <iostream>
Macros | |
#define | LinuxDuration(oisDuration) |
#define | LinuxInfiniteDuration 0xFFFF |
#define | LinuxMaxLevel 0x7FFF |
#define | LinuxPositiveLevel(oisLevel) toUnsigned15(LinuxMaxLevel*(long)(oisLevel)/OISMaxLevel) |
#define | LinuxSignedLevel(oisLevel) toSigned16(LinuxMaxLevel*(long)(oisLevel)/OISMaxLevel) |
#define | MaxSigned16Value 0x7FFF |
#define | MaxUnsigned15Value 0x7FFF |
#define | MinSigned16Value -0x7FFF |
#define | OIS_LINUX_JOYFF_DEBUG 1 |
#define | OISDurationUnitMS 1000 |
#define | OISMaxLevel 10000 |
#define | toSigned16(value) (__s16)((value) < MinSigned16Value ? MinSigned16Value : ((value) > MaxSigned16Value ? MaxSigned16Value : (value))) |
#define | toUnsigned15(value) (__u16)((value) < 0 ? 0 : ((value) > MaxUnsigned15Value ? MaxUnsigned15Value : (value))) |
#define LinuxDuration | ( | oisDuration | ) |
#define LinuxInfiniteDuration 0xFFFF |
#define LinuxMaxLevel 0x7FFF |
#define LinuxPositiveLevel | ( | oisLevel | ) | toUnsigned15(LinuxMaxLevel*(long)(oisLevel)/OISMaxLevel) |
#define LinuxSignedLevel | ( | oisLevel | ) | toSigned16(LinuxMaxLevel*(long)(oisLevel)/OISMaxLevel) |
#define MaxSigned16Value 0x7FFF |
#define MaxUnsigned15Value 0x7FFF |
#define MinSigned16Value -0x7FFF |
#define OIS_LINUX_JOYFF_DEBUG 1 |
#define OISDurationUnitMS 1000 |
#define OISMaxLevel 10000 |
#define toSigned16 | ( | value | ) | (__s16)((value) < MinSigned16Value ? MinSigned16Value : ((value) > MaxSigned16Value ? MaxSigned16Value : (value))) |
#define toUnsigned15 | ( | value | ) | (__u16)((value) < 0 ? 0 : ((value) > MaxUnsigned15Value ? MaxUnsigned15Value : (value))) |