English
Language : 

SLAU292C Datasheet, PDF (48/102 Pages) Texas Instruments – eZ430-Chronos™ Development Tool
eZ430-Chronos Software Projects
www.ti.com
3.6.5.1.2 Control Center DLL
The sources for the DLL are available in the eZ430-Chronos Windows package and can be found in
C:\Program Files\Texas Instruments\eZ430-Chronos\Control Center\GUI Sources\DLL.
The eZ430-Chronos Windows DLL has been developed using Microsoft Visual C++ 2008 Express Edition.
In order to rebuild the DLL file the Microsoft Visual Studio must be installed, since the registry enumeration
code uses MFC functions. If Microsoft Visual Studio is not present, it is still possible to rebuild the DLL, but
the "enumser" source code part needs to be removed from the project. Therefore, the BM_GetCOM()
function won’t work anymore.
The DLL has two interface sections, one that exports standard C functions, and a second one exporting
TCL-compliant functions. These TCL-compliant functions are used by the graphical user interface. Hence,
when compiling the DLL, TCL needs to be present in the default directory (C:\Tcl); otherwise, the
reference to the TCL libraries (tcl85.lib, tclstub85.lib) is invalid. If the DLL is compiled without the TCL
interface, the respective source code file and the references to the TCL libraries must be deleted.
COM Port Management
1. Opening the COM port
Prior to any communication, the COM port where the RF access point is connected must be opened.
The hardware is powered up immediately after the unit is connected. Some parts of the hardware
require a startup time of several hundred milliseconds. As a result, any access to the hardware should
not be done within one second after connecting the device.
NOTE: To address COM ports higher than COM9 in Windows, precede the "COMxx" string with the
sequence "\\.\".
The COM port is opened with the following function:
bool BM_OpenCOM( char * strPortName,
DWORD dwBaudrate = 115200,
WORD wTimeout = 30,
bool bRTS = false,
bool bDTR = false);
Parameters
strPortName
Name of the COM port (for example, "\\.\COM11").
wTimeout
Time in milliseconds a reply to a command is expected; default value is 30 ms, should not be
changed
dwBaudrate
Baudrate for the serial interface; default is 115200 Baud, should not be changed
bRTS
State of RTS line during normal operation; default is false (=GND), should not be changed
bDTR
State of DTR line during normal operation; default is false (=GND), should not be changed
Return Value
Returns true if COM port could be opened, otherwise returns false.
2. Closing the COM port
A successfully opened COM port must be closed when quitting the application to release all allocated
memory and the port itself.
The COM port is closed with the following function:
void BM_CloseCOM(void);
48
eZ430-Chronos Software
SLAU292C – November 2009 – Revised December 2010
Submit Documentation Feedback
© 2009–2010, Texas Instruments Incorporated