00001 #ifndef __KSJ_API_IO_H__
00002 #define __KSJ_API_IO_H__
00003
00004
00005
00006 #ifdef KSJAPI_EXPORTS
00007 #define KSJ_API __declspec(dllexport)
00008 #elif defined KSJAPI_STATIC
00009 #define KSJ_API
00010 #else
00011 #define KSJ_API __declspec(dllimport)
00012 #endif
00013
00014 #ifdef __cplusplus
00015 extern "C"{
00016 #endif
00017
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 KSJ_API int __stdcall KSJ_GpioSetDirection( int nIndex, unsigned char btDirection );
00031
00042 KSJ_API int __stdcall KSJ_GpioGetDirection( int nIndex, unsigned char *pbtDirection );
00043
00054 KSJ_API int __stdcall KSJ_GpioSetStatus( int nIndex, unsigned char btGpioStatus );
00055
00066 KSJ_API int __stdcall KSJ_GpioGetStatus( int nIndex, unsigned char *pbtGpioStatus );
00067
00082 KSJ_API int __stdcall KSJ_FlashControlSet(int nIndex, bool bEnable, bool bInvert, int nMode);
00083
00096 KSJ_API int __stdcall KSJ_FlashControlGet(int nIndex, bool *pbEnable, bool *pbInvert, int *pnMode);
00097
00108 KSJ_API int __stdcall KSJ_FlashEnableSet(int nIndex, bool bEnable);
00109
00120 KSJ_API int __stdcall KSJ_FlashEnableGet(int nIndex, bool *pbEnable);
00121
00132 KSJ_API int __stdcall KSJ_FlashInvertSet(int nIndex, bool bInvert);
00133
00144 KSJ_API int __stdcall KSJ_FlashInvertGet(int nIndex, bool *pbInvert);
00145
00151
00152 enum KSJ_GPIOIN_MODE
00153 {
00154 KSJ_GPIOIN_EXTERNALTRIGGER,
00155 KSJ_GPIOIN_NORMAL
00156 };
00157
00171 KSJ_API int __stdcall KSJ_GpioInModeSet(int nIndex, KSJ_GPIOIN_MODE GpioInMode);
00172
00183 KSJ_API int __stdcall KSJ_GpioInModeGet(int nIndex, KSJ_GPIOIN_MODE *pGpioInMode);
00184
00195 KSJ_API int __stdcall KSJ_GpioInStatusGet(int nIndex, unsigned char *pbtValue);
00196
00197
00198
00199
00200
00202 enum KSJ_GPIOOUT_MODE
00203 {
00204 KSJ_GPIOOUT_FLASH,
00205 KSJ_GPIOOUT_NORMAL
00206 };
00207
00221 KSJ_API int __stdcall KSJ_GpioOutModeSet(int nIndex, KSJ_GPIOOUT_MODE GpioOutMode);
00222
00233 KSJ_API int __stdcall KSJ_GpioOutModeGet(int nIndex, KSJ_GPIOOUT_MODE *pGpioOutMode);
00234
00245 KSJ_API int __stdcall KSJ_GpioOutStatusSet(int nIndex, unsigned char btValue);
00246
00257 KSJ_API int __stdcall KSJ_GpioFilterSet(int nIndex, unsigned short wFilterTimeUs);
00258
00269 KSJ_API int __stdcall KSJ_GpioFilterGet(int nIndex, unsigned short *pwFilterTimeUs);
00273 #ifdef __cplusplus
00274 }
00275 #endif
00276
00277
00278 #endif