2 ** =========================================================================
3 ** Copyright (c) 2004-2010 Immersion Corporation. All rights reserved.
4 ** Immersion Corporation Confidential and Proprietary
10 ** Device-dependent functions called by Immersion TSP API
11 ** to control PWM duty cycle, amp enable/disable, save IVT file, etc...
13 ** =========================================================================
20 #endif /* __cplusplus */
24 #define IMMVIBESPIAPI __declspec(dllimport)
26 #define IMMVIBESPIAPI extern
30 #include <linux/device.h>
39 ** Called at initialization time to set PWM freq, disable amp, etc...
41 IMMVIBESPIAPI VibeStatus ImmVibeSPI_ForceOut_Initialize(struct device *dev, enum chip_type type);
44 ** Called at termination time to set PWM freq, disable amp, etc...
46 IMMVIBESPIAPI VibeStatus ImmVibeSPI_ForceOut_Terminate(void);
49 ** Called to disable amp (disable output force)
51 IMMVIBESPIAPI VibeStatus ImmVibeSPI_ForceOut_AmpDisable(VibeUInt8 nActuatorIndex);
54 ** Called to enable amp (enable output force)
56 IMMVIBESPIAPI VibeStatus ImmVibeSPI_ForceOut_AmpEnable(VibeUInt8 nActuatorIndex);
59 ** Called to save an IVT data file (pIVT) to a file (szPathName)
61 IMMVIBESPIAPI VibeStatus ImmVibeSPI_IVTFile_Save(const VibeUInt8 *pIVT, VibeUInt32 nIVTSize, const char *szPathname);
64 ** Called to delete an IVT file
66 IMMVIBESPIAPI VibeStatus ImmVibeSPI_IVTFile_Delete(const char *szPathname);
69 ** Called to get the device name (device name must be returned as ANSI char)
71 IMMVIBESPIAPI VibeStatus ImmVibeSPI_Device_GetName(VibeUInt8 nActuatorIndex, char *szDevName, int nSize);
74 ** Called to send output force samples
76 IMMVIBESPIAPI VibeStatus ImmVibeSPI_ForceOut_SetSamples(VibeUInt8 nActuatorIndex, VibeUInt16 nOutputSignalBitDepth, VibeUInt16 nBufferSizeInBytes, VibeInt8* pForceOutputBuffer);
79 ** Called to set output frequency parameters
81 IMMVIBESPIAPI VibeStatus ImmVibeSPI_ForceOut_SetFrequency(VibeUInt8 nActuatorIndex, VibeUInt16 nFrequencyParameterID, VibeUInt32 nFrequencyParameterValue);
84 ** Called at initialization time to get the number of actuators
86 IMMVIBESPIAPI VibeStatus ImmVibeSPI_Device_GetNum(void);
88 struct controller_chip;
90 void Turn_on_chip(struct controller_chip *chip);
91 void Turn_off_chip(struct controller_chip *chip);
95 #endif /* __cplusplus */
97 #endif /* _IMMVIBESPI_H */