tilib: fix calling convention for Cygwin.
WINAPI wasn't getting defined with gcc-3.
This commit is contained in:
parent
ff42788071
commit
f9d271cd64
|
@ -28,8 +28,10 @@
|
||||||
|
|
||||||
#if defined(__Windows__) || defined(__CYGWIN__)
|
#if defined(__Windows__) || defined(__CYGWIN__)
|
||||||
static const char tilib_filename[] = "MSP430.DLL";
|
static const char tilib_filename[] = "MSP430.DLL";
|
||||||
|
#define TIDLL __stdcall
|
||||||
#else
|
#else
|
||||||
static const char tilib_filename[] = "libmsp430.so";
|
static const char tilib_filename[] = "libmsp430.so";
|
||||||
|
#define TIDLL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct tilib_device {
|
struct tilib_device {
|
||||||
|
@ -45,43 +47,43 @@ struct tilib_device {
|
||||||
char uifPath[1024];
|
char uifPath[1024];
|
||||||
|
|
||||||
/* MSP430.h */
|
/* MSP430.h */
|
||||||
STATUS_T WINAPI (*MSP430_Initialize)(char *port, long *version);
|
STATUS_T TIDLL (*MSP430_Initialize)(char *port, long *version);
|
||||||
STATUS_T WINAPI (*MSP430_VCC)(long voltage);
|
STATUS_T TIDLL (*MSP430_VCC)(long voltage);
|
||||||
STATUS_T WINAPI (*MSP430_Configure)(long mode, long value);
|
STATUS_T TIDLL (*MSP430_Configure)(long mode, long value);
|
||||||
STATUS_T WINAPI (*MSP430_OpenDevice)(char *Device, char *Password,
|
STATUS_T TIDLL (*MSP430_OpenDevice)(char *Device, char *Password,
|
||||||
long PwLength, long DeviceCode,
|
long PwLength, long DeviceCode,
|
||||||
long setId);
|
long setId);
|
||||||
STATUS_T WINAPI (*MSP430_GetFoundDevice)(char *FoundDevice,
|
STATUS_T TIDLL (*MSP430_GetFoundDevice)(char *FoundDevice,
|
||||||
long count);
|
long count);
|
||||||
STATUS_T WINAPI (*MSP430_Close)(long vccOff);
|
STATUS_T TIDLL (*MSP430_Close)(long vccOff);
|
||||||
STATUS_T WINAPI (*MSP430_Memory)(long address, char *buffer,
|
STATUS_T TIDLL (*MSP430_Memory)(long address, char *buffer,
|
||||||
long count, long rw);
|
long count, long rw);
|
||||||
STATUS_T WINAPI (*MSP430_Reset)(long method, long execute,
|
STATUS_T TIDLL (*MSP430_Reset)(long method, long execute,
|
||||||
long releaseJTAG);
|
long releaseJTAG);
|
||||||
STATUS_T WINAPI (*MSP430_Erase)(long type, long address, long length);
|
STATUS_T TIDLL (*MSP430_Erase)(long type, long address, long length);
|
||||||
STATUS_T WINAPI (*MSP430_Error_Number)(void);
|
STATUS_T TIDLL (*MSP430_Error_Number)(void);
|
||||||
const char *WINAPI (*MSP430_Error_String)(long errNumber);
|
const char *TIDLL (*MSP430_Error_String)(long errNumber);
|
||||||
|
|
||||||
STATUS_T WINAPI (*MSP430_GetNumberOfUsbIfs)(long* number);
|
STATUS_T TIDLL (*MSP430_GetNumberOfUsbIfs)(long* number);
|
||||||
STATUS_T WINAPI (*MSP430_GetNameOfUsbIf)(long idx, char **name,
|
STATUS_T TIDLL (*MSP430_GetNameOfUsbIf)(long idx, char **name,
|
||||||
long *status);
|
long *status);
|
||||||
|
|
||||||
/* MSP430_Debug.h */
|
/* MSP430_Debug.h */
|
||||||
STATUS_T WINAPI (*MSP430_Registers)(long *registers, long mask,
|
STATUS_T TIDLL (*MSP430_Registers)(long *registers, long mask,
|
||||||
long rw);
|
long rw);
|
||||||
STATUS_T WINAPI (*MSP430_Run)(long mode, long releaseJTAG);
|
STATUS_T TIDLL (*MSP430_Run)(long mode, long releaseJTAG);
|
||||||
STATUS_T WINAPI (*MSP430_State)(long *state, long stop,
|
STATUS_T TIDLL (*MSP430_State)(long *state, long stop,
|
||||||
long *pCPUCycles);
|
long *pCPUCycles);
|
||||||
|
|
||||||
/* MSP430_EEM.h */
|
/* MSP430_EEM.h */
|
||||||
STATUS_T WINAPI (*MSP430_EEM_Init)(DLL430_EVENTNOTIFY_FUNC callback,
|
STATUS_T TIDLL (*MSP430_EEM_Init)(DLL430_EVENTNOTIFY_FUNC callback,
|
||||||
long clientHandle,
|
long clientHandle,
|
||||||
MessageID_t *pMsgIdBuffer);
|
MessageID_t *pMsgIdBuffer);
|
||||||
STATUS_T WINAPI (*MSP430_EEM_SetBreakpoint)(uint16_t *pwBpHandle,
|
STATUS_T TIDLL (*MSP430_EEM_SetBreakpoint)(uint16_t *pwBpHandle,
|
||||||
BpParameter_t *pBpBuffer);
|
BpParameter_t *pBpBuffer);
|
||||||
|
|
||||||
/* MSP430_FET.h */
|
/* MSP430_FET.h */
|
||||||
STATUS_T WINAPI (*MSP430_FET_FwUpdate)(char* lpszFileName,
|
STATUS_T TIDLL (*MSP430_FET_FwUpdate)(char* lpszFileName,
|
||||||
DLL430_FET_NOTIFY_FUNC callback,
|
DLL430_FET_NOTIFY_FUNC callback,
|
||||||
long clientHandle);
|
long clientHandle);
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,7 @@
|
||||||
typedef HMODULE dynload_handle_t;
|
typedef HMODULE dynload_handle_t;
|
||||||
#else /* __Windows__ */
|
#else /* __Windows__ */
|
||||||
typedef void *dynload_handle_t;
|
typedef void *dynload_handle_t;
|
||||||
#endif
|
#endif /* __Windows__ */
|
||||||
|
|
||||||
#ifndef WINAPI
|
|
||||||
#define WINAPI
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dynload_handle_t dynload_open(const char *filename);
|
dynload_handle_t dynload_open(const char *filename);
|
||||||
void dynload_close(dynload_handle_t hnd);
|
void dynload_close(dynload_handle_t hnd);
|
||||||
|
|
Loading…
Reference in New Issue