/*---------------------------------------------------------------------------* Project: Cafe File: vpadAPIs.h Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #ifndef __VPAD_API_H__ #define __VPAD_API_H__ #ifdef __cplusplus extern "C" { #endif /*************************************/ /* function prototype */ /*************************************/ void VPADInit ( void ) ; void VPADShutdown ( void ) ; s32 VPADRead ( s32 chan, VPADStatus samplingBufs[], u32 length, s32* err ) ; void VPADSetAccParam ( s32 chan, f32 play_radius, f32 sensitivity ) ; void VPADGetAccParam ( s32 chan, f32 *play_radius, f32 *sensitivity ) ; void VPADSetBtnRepeat ( s32 chan, f32 delay_sec, f32 pulse_sec ) ; void VPADEnableStickCrossClamp ( s32 chan ) ; void VPADDisableStickCrossClamp ( s32 chan ) ; void VPADSetLStickClampThreshold( s32 chan, s32 max, s32 min) ; void VPADSetRStickClampThreshold( s32 chan, s32 max, s32 min) ; void VPADGetLStickClampThreshold( s32 chan, s32* max, s32* min) ; void VPADGetRStickClampThreshold( s32 chan, s32* max, s32* min) ; void VPADSetStickOrigin ( s32 chan ) ; void VPADDisableLStickZeroClamp ( s32 chan ) ; void VPADDisableRStickZeroClamp ( s32 chan ) ; void VPADEnableLStickZeroClamp ( s32 chan ) ; void VPADEnableRStickZeroClamp ( s32 chan ) ; void VPADSetCrossStickEmulationParamsL( s32 chan, f32 rot_deg, f32 xy_deg, f32 radius ); void VPADSetCrossStickEmulationParamsR( s32 chan, f32 rot_deg, f32 xy_deg, f32 radius ); void VPADGetCrossStickEmulationParamsL( s32 chan, f32* rot_deg, f32* xy_deg, f32* radius ); void VPADGetCrossStickEmulationParamsR( s32 chan, f32* rot_deg, f32* xy_deg, f32* radius ); VPADSamplingCallback VPADSetSamplingCallback( s32 chan, VPADSamplingCallback callback ) ; void VPADSetAccPlayMode ( s32 chan, VPADPlayMode mode ) ; VPADPlayMode VPADGetAccPlayMode ( s32 chan ) ; void VPADSetButtonProcMode ( s32 chan, u8 mode ) ; u8 VPADGetButtonProcMode ( s32 chan ) ; //======= Gyro Calculation =======// void VPADSetGyroAngle ( s32 chan, f32 ax, f32 ay, f32 az ) ; void VPADSetGyroDirection ( s32 chan, VPADDir *dir ) ; void VPADSetGyroDirectionMag ( s32 chan, f32 mag ) ; void VPADSetGyroMagnification ( s32 chan, f32 pitch, f32 yaw, f32 roll ) ; void VPADEnableGyroZeroPlay ( s32 chan ) ; void VPADEnableGyroDirRevise( s32 chan ) ; void VPADEnableGyroAccRevise( s32 chan ) ; void VPADDisableGyroZeroPlay ( s32 chan ) ; void VPADDisableGyroDirRevise( s32 chan ) ; void VPADDisableGyroAccRevise( s32 chan ) ; f32 VPADIsEnableGyroZeroPlay ( s32 chan ) ; f32 VPADIsEnableGyroZeroDrift( s32 chan ) ; f32 VPADIsEnableGyroDirRevise( s32 chan ) ; f32 VPADIsEnableGyroAccRevise( s32 chan ) ; void VPADSetGyroZeroPlayParam ( s32 chan, f32 radius ) ; void VPADSetGyroDirReviseParam( s32 chan, f32 revise_pw ) ; void VPADSetGyroAccReviseParam( s32 chan, f32 revise_pw, f32 revise_range ) ; void VPADSetGyroDirReviseBase ( s32 chan, VPADDir *base ) ; void VPADGetGyroZeroPlayParam ( s32 chan, f32 *radius ) ; void VPADGetGyroDirReviseParam( s32 chan, f32 *revise_pw ) ; void VPADGetGyroAccReviseParam( s32 chan, f32 *revise_pw, f32 *revise_range ) ; void VPADInitGyroZeroPlayParam ( s32 chan ) ; void VPADInitGyroDirReviseParam( s32 chan ) ; void VPADInitGyroAccReviseParam( s32 chan ) ; void VPADInitGyroZeroDriftMode( s32 chan ) ; void VPADSetGyroZeroDriftMode ( s32 chan, VPADGyroZeroDriftMode mode ) ; void VPADGetGyroZeroDriftMode ( s32 chan, VPADGyroZeroDriftMode *mode ) ; //======= Touch Panel =======// s16 VPADCalcTPCalibrationParam( VPADTPCalibrationParam* param, u16 rawX1, u16 rawY1, u16 x1, u16 y1, u16 rawX2, u16 rawY2, u16 x2, u16 y2 ); void VPADSetTPCalibrationParam( s32 chan, const VPADTPCalibrationParam param ); void VPADGetTPCalibrationParam( s32 chan, VPADTPCalibrationParam* param ); void VPADGetTPCalibratedPoint( s32 chan, VPADTPData *disp, const VPADTPData *raw ); void VPADGetTPCalibratedPointEx( s32 chan, VPADTPResolution tpReso, VPADTPData *disp, const VPADTPData *raw ); //======= Motor =======// s32 VPADControlMotor( s32 chan, u8* pattern, u8 length ) ; void VPADStopMotor( s32 chan ) ; //======= Sensorbar LED =======// s32 VPADSetSensorBar( s32 chan, BOOL on ) ; //======= LCD Mode =======// s32 VPADSetLcdMode( s32 chan, VPADLcdMode mode ) ; s32 VPADGetLcdMode( s32 chan, VPADLcdMode *mode ) ; //======= TV Menu =======// u8 VPADGetTVMenuStatus ( s32 chan ) ; //======= Magnetometer =======// f32 VPADIsStartedGyroMagRevise( s32 chan ); void VPADStartGyroMagRevise ( s32 chan ); void VPADStopGyroMagRevise ( s32 chan ); void VPADSetGyroMagReviseParam( s32 chan, f32 revise_pw, f32 play_angle ) ; void VPADGetGyroMagReviseParam( s32 chan, f32* revise_pw, f32* play_angle ) ; #ifdef __cplusplus } #endif #endif // __VPAD_API_H__