From c27319498d33889b34221ce2afcbadd7d1204948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1zaro=20Vieira?= Date: Sun, 29 Oct 2017 05:16:43 -0300 Subject: [PATCH 1/2] Add more libcurl functions --- source/curl_functions.c | 10 ++++++++++ source/curl_functions.h | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/source/curl_functions.c b/source/curl_functions.c index 459524d..eafb65d 100644 --- a/source/curl_functions.c +++ b/source/curl_functions.c @@ -31,7 +31,12 @@ EXPORT_DECL(CURL *, n_curl_easy_init, void); EXPORT_DECL(CURLcode, n_curl_easy_setopt, CURL *curl, CURLoption option, ...); EXPORT_DECL(CURLcode, n_curl_easy_perform, CURL *curl); EXPORT_DECL(void, n_curl_easy_cleanup, CURL *curl); +EXPORT_DECL(void, n_curl_easy_reset, CURL *curl); EXPORT_DECL(CURLcode, n_curl_easy_getinfo, CURL *curl, CURLINFO info, ...); +EXPORT_DECL(CURLFORMcode, n_curl_formadd, struct curl_httppost **firstitem, struct curl_httppost **lastitem, ...); +EXPORT_DECL(void, n_curl_formfree, struct curl_httppost *form); +EXPORT_DECL(struct curl_slist *, n_curl_slist_append, struct curl_slist *list, const char *string); +EXPORT_DECL(void, n_curl_slist_free_all, struct curl_slist *list); void InitAcquireCurl(void) { @@ -48,7 +53,12 @@ void InitCurlFunctionPointers(void) OS_FIND_EXPORT_EX(libcurl_handle, curl_easy_setopt, n_curl_easy_setopt); OS_FIND_EXPORT_EX(libcurl_handle, curl_easy_perform, n_curl_easy_perform); OS_FIND_EXPORT_EX(libcurl_handle, curl_easy_cleanup, n_curl_easy_cleanup); + OS_FIND_EXPORT_EX(libcurl_handle, curl_easy_reset, n_curl_easy_reset); OS_FIND_EXPORT_EX(libcurl_handle, curl_easy_getinfo, n_curl_easy_getinfo); + OS_FIND_EXPORT_EX(libcurl_handle, curl_formadd, n_curl_formadd); + OS_FIND_EXPORT_EX(libcurl_handle, curl_formfree, n_curl_formfree); + OS_FIND_EXPORT_EX(libcurl_handle, curl_slist_append, n_curl_slist_append); + OS_FIND_EXPORT_EX(libcurl_handle, curl_slist_free_all, n_curl_slist_free_all); n_curl_global_init(CURL_GLOBAL_ALL); } diff --git a/source/curl_functions.h b/source/curl_functions.h index 638e103..60a998a 100644 --- a/source/curl_functions.h +++ b/source/curl_functions.h @@ -43,7 +43,12 @@ extern CURL * (* n_curl_easy_init)(void); extern CURLcode (* n_curl_easy_setopt)(CURL *curl, CURLoption option, ...); extern CURLcode (* n_curl_easy_perform)(CURL *curl); extern void (* n_curl_easy_cleanup)(CURL *curl); +extern void (* n_curl_easy_reset)(CURL *curl); extern CURLcode (* n_curl_easy_getinfo)(CURL *curl, CURLINFO info, ...); +extern CURLFORMcode (* n_curl_formadd)(struct curl_httppost **firstitem, struct curl_httppost **lastitem, ...); +extern void (* n_curl_formfree)(struct curl_httppost *form); +extern struct curl_slist * (* n_curl_slist_append)(struct curl_slist *list, const char *string); +extern void (* n_curl_slist_free_all)(struct curl_slist *list); #ifdef __cplusplus } From 46931010b190bb3ca340b564deefb1923f88bac2 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Sat, 3 Feb 2018 22:25:27 -0500 Subject: [PATCH 2/2] Add more VPAD functions Added VPADDisableLStickZeroClamp, VPADDisableRStickZeroClamp, VPADEnableLStickZeroClamp, VPADEnableRStickZeroClamp, VPADSetCrossStickEmulationParamsL, VPADSetCrossStickEmulationParamsR, VPADGetCrossStickEmulationParamsL, VPADGetCrossStickEmulationParamsR, VPADControlMotor and VPADStopMotor. --- source/vpad_functions.c | 24 ++++++++++++++++++++++-- source/vpad_functions.h | 14 ++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/source/vpad_functions.c b/source/vpad_functions.c index 3a06386..39fa9ea 100644 --- a/source/vpad_functions.c +++ b/source/vpad_functions.c @@ -40,6 +40,14 @@ EXPORT_DECL(void, VPADSetRStickClampThreshold, s32 chan, s32 max, s32 min); EXPORT_DECL(void, VPADGetLStickClampThreshold, s32 chan, s32* max, s32* min); EXPORT_DECL(void, VPADGetRStickClampThreshold, s32 chan, s32* max, s32* min); EXPORT_DECL(void, VPADSetStickOrigin, s32 chan); +EXPORT_DECL(void, VPADDisableLStickZeroClamp, s32 chan); +EXPORT_DECL(void, VPADDisableRStickZeroClamp, s32 chan); +EXPORT_DECL(void, VPADEnableLStickZeroClamp, s32 chan); +EXPORT_DECL(void, VPADEnableRStickZeroClamp, s32 chan); +EXPORT_DECL(void, VPADSetCrossStickEmulationParamsL, s32 chan, f32 rot_deg, f32 xy_deg, f32 radius); +EXPORT_DECL(void, VPADSetCrossStickEmulationParamsR, s32 chan, f32 rot_deg, f32 xy_deg, f32 radius); +EXPORT_DECL(void, VPADGetCrossStickEmulationParamsL, s32 chan, f32* rot_deg, f32* xy_deg, f32* radius); +EXPORT_DECL(void, VPADGetCrossStickEmulationParamsR, s32 chan, f32* rot_deg, f32* xy_deg, f32* radius); EXPORT_DECL(void, VPADSetGyroAngle, s32 chan, f32 ax, f32 ay, f32 az); EXPORT_DECL(void, VPADSetGyroDirection, s32 chan, VPADDir *dir); EXPORT_DECL(void, VPADSetGyroDirectionMag, s32 chan, f32 mag); @@ -72,8 +80,10 @@ EXPORT_DECL(void, VPADSetTPCalibrationParam, s32 chan, const VPADTPCalibrationPa EXPORT_DECL(void, VPADGetTPCalibrationParam, s32 chan, VPADTPCalibrationParam* param); EXPORT_DECL(void, VPADGetTPCalibratedPoint, s32 chan, VPADTPData *disp, const VPADTPData *raw); EXPORT_DECL(void, VPADGetTPCalibratedPointEx, s32 chan, VPADTPResolution tpReso, VPADTPData *disp, const VPADTPData *raw); -EXPORT_DECL(s32, VPADSetLcdMode, s32 padnum, s32 lcdmode); -EXPORT_DECL(s32, VPADGetLcdMode, s32 padnum, s32 *lcdmode); +EXPORT_DECL(s32, VPADControlMotor, s32 chan, u8* pattern, u8 length); +EXPORT_DECL(void, VPADStopMotor, s32 chan); +EXPORT_DECL(s32, VPADSetLcdMode, s32 chan, s32 lcdmode); +EXPORT_DECL(s32, VPADGetLcdMode, s32 chan, s32 *lcdmode); EXPORT_DECL(s32, VPADBASEGetMotorOnRemainingCount, s32 lcdmode); EXPORT_DECL(s32, VPADBASESetMotorOnRemainingCount, s32 lcdmode, s32 counter); EXPORT_DECL(void, VPADBASESetSensorBarSetting, s32 chan, s8 setting); @@ -104,6 +114,14 @@ void InitVPadFunctionPointers(void){ OS_FIND_EXPORT(vpad_handle, VPADGetLStickClampThreshold); OS_FIND_EXPORT(vpad_handle, VPADGetRStickClampThreshold); OS_FIND_EXPORT(vpad_handle, VPADSetStickOrigin); + OS_FIND_EXPORT(vpad_handle, VPADDisableLStickZeroClamp); + OS_FIND_EXPORT(vpad_handle, VPADDisableRStickZeroClamp); + OS_FIND_EXPORT(vpad_handle, VPADEnableLStickZeroClamp); + OS_FIND_EXPORT(vpad_handle, VPADEnableRStickZeroClamp); + OS_FIND_EXPORT(vpad_handle, VPADSetCrossStickEmulationParamsL); + OS_FIND_EXPORT(vpad_handle, VPADSetCrossStickEmulationParamsR); + OS_FIND_EXPORT(vpad_handle, VPADGetCrossStickEmulationParamsL); + OS_FIND_EXPORT(vpad_handle, VPADGetCrossStickEmulationParamsR); OS_FIND_EXPORT(vpad_handle, VPADSetGyroAngle); OS_FIND_EXPORT(vpad_handle, VPADSetGyroDirection); OS_FIND_EXPORT(vpad_handle, VPADSetGyroDirectionMag); @@ -136,6 +154,8 @@ void InitVPadFunctionPointers(void){ OS_FIND_EXPORT(vpad_handle, VPADGetTPCalibrationParam); OS_FIND_EXPORT(vpad_handle, VPADGetTPCalibratedPoint); OS_FIND_EXPORT(vpad_handle, VPADGetTPCalibratedPointEx); + OS_FIND_EXPORT(vpad_handle, VPADControlMotor); + OS_FIND_EXPORT(vpad_handle, VPADStopMotor); OS_FIND_EXPORT(vpad_handle, VPADSetLcdMode); OS_FIND_EXPORT(vpad_handle, VPADGetLcdMode); OS_FIND_EXPORT(vpad_handle, VPADSetSensorBar); diff --git a/source/vpad_functions.h b/source/vpad_functions.h index 33ff09d..a666294 100644 --- a/source/vpad_functions.h +++ b/source/vpad_functions.h @@ -154,6 +154,14 @@ extern void (* VPADSetRStickClampThreshold)(s32 chan, s32 max, s32 min); extern void (* VPADGetLStickClampThreshold)(s32 chan, s32* max, s32* min); extern void (* VPADGetRStickClampThreshold)(s32 chan, s32* max, s32* min); extern void (* VPADSetStickOrigin)(s32 chan); +extern void (* VPADDisableLStickZeroClamp)(s32 chan); +extern void (* VPADDisableRStickZeroClamp)(s32 chan); +extern void (* VPADEnableLStickZeroClamp)(s32 chan); +extern void (* VPADEnableRStickZeroClamp)(s32 chan); +extern void (* VPADSetCrossStickEmulationParamsL)(s32 chan, f32 rot_deg, f32 xy_deg, f32 radius); +extern void (* VPADSetCrossStickEmulationParamsR)(s32 chan, f32 rot_deg, f32 xy_deg, f32 radius); +extern void (* VPADGetCrossStickEmulationParamsL)(s32 chan, f32* rot_deg, f32* xy_deg, f32* radius); +extern void (* VPADGetCrossStickEmulationParamsR)(s32 chan, f32* rot_deg, f32* xy_deg, f32* radius); extern void (* VPADSetGyroAngle)(s32 chan, f32 ax, f32 ay, f32 az); extern void (* VPADSetGyroDirection)(s32 chan, VPADDir *dir); extern void (* VPADSetGyroDirectionMag)(s32 chan, f32 mag); @@ -186,8 +194,10 @@ extern void (* VPADSetTPCalibrationParam)(s32 chan, const VPADTPCalibrationParam extern void (* VPADGetTPCalibrationParam)(s32 chan, VPADTPCalibrationParam* param); extern void (* VPADGetTPCalibratedPoint)(s32 chan, VPADTPData *disp, const VPADTPData *raw); extern void (* VPADGetTPCalibratedPointEx)(s32 chan, VPADTPResolution tpReso, VPADTPData *disp, const VPADTPData *raw); -extern s32 (* VPADSetLcdMode)(s32 padnum, s32 lcdmode); -extern s32 (* VPADGetLcdMode)(s32 padnum, s32 *lcdmode); +extern s32 (* VPADControlMotor)(s32 chan, u8* pattern, u8 length); +extern void (* VPADStopMotor)(s32 chan); +extern s32 (* VPADSetLcdMode)(s32 chan, s32 lcdmode); +extern s32 (* VPADGetLcdMode)(s32 chan, s32 *lcdmode); extern s32 (* VPADBASEGetMotorOnRemainingCount)(s32 lcdmode); extern s32 (* VPADBASESetMotorOnRemainingCount)(s32 lcdmode, s32 counter); extern void (* VPADBASESetSensorBarSetting)(s32 chan, s8 setting);