slau358q.pdf - 第83页
www.ti.com MSP-GANG.dll Description 83 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Dynamic Link Library for MSP-GANG Programmer 4.2…

www.ti.com
MSP-GANG.dll Description
83
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.4 MSPGANG_LoadFirmware
Load firmware from MSP-GANG.dll to MSP-GANG Programmer,
NOTE: Do not use this command. This command is used by the API-DLL and GUI only.
Syntax
LONG MSPGANG_LoadFirmware(void)
4.2.5 MSPGANG_InitCom
MSPGANG_InitCom opens a communications port, sets the baud rate and checks if the MSP-GANG
Programmer is present.
Syntax
LONG MSPGANG_InitCom(LPTSTR lpszPort, LONG lBaud)
Arguments
char * lpszComPort Name of the port
LONG lBaudRate Baud rate
Result
LONG Error code
4.2.6 MSPGANG_ReleaseCom
Release communications port
Syntax
LONG MSPGANG_ReleaseCom(void)
Arguments
None
Result
LONG Error code

MSP-GANG.dll Description
www.ti.com
84
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.7 MSPGANG_GetErrorString
Returns the error string for the selected error number (response from any functions that returns error
status).
Syntax
LPTSTR MSPGANG_GetErrorString(LONG lErrorNumber)
Arguments
LONG lErrorNumber Error number
Result
LPTSTR Error string
4.2.8 MSPGANG_SelectBaudrate
MSPGANG_SelectBaudrate sets the rate of the serial communications. The default is 9600 baud. Baud
rate index 0 to 4, representing the baud rate. The Select Baud Rate command takes effect (that is,
changes the baud rate) immediately.
Syntax
LONG MSPGANG_SelectBaudrate(LONG lBaud)
Arguments
LONG lBaud Baud rate in bytes per second
0 = 9600 baud (default)
1 = 19200 baud
2 = 38400 baud
3 = 57600 baud
4 = 115200 baud
Result
LONG Error code
4.2.9 MSPGANG_GetDiagnostic
See the Get Diagnostic command (Section 3.5.2.4) for detailed information about received data contents.
Syntax
LONG MSPGANG_GetDiagnostic(void **lpData)
Arguments
void ** lpData Pointer to data buffer
Result
LONG Error code
