ST AN1874 Application note

AN1874
APPLICATION NOTE
Dynamic-Link Library for the CRX14 USB Demokit
This application note introduces the dynamic-link library (DLL) that provides the programming interface for the CRX14 USB reader demonstration kit.
The CRX14 USB reader demonstration kit is designed to show off the STMicroelectronics short range con­tactless memory product range. These contactless memories, such as SR176, SRIX512 and SRIX4K, are powered by a transmitted carrier radio wave, at 13.56MHz.
The CRX14 USB reader demonstration kit can be controlled via the Universal Serial Bus (USB). The DLL, that is presented here, gives the application developer a wide variety of possibilities for working easily with this demonstration kit, even using just low level commands.

MAIN FEATURES

The DLL can be used together with the following programming languages and development tools:
C / C++ (Microsoft Visual C++, Borland C++ Builder)
Pascal (Borland Delphi)
Basic (Microsoft Vi su al Basic)

PACKAGE CONTENT The DLL package consists of the following source files, in the root .\ directory:

CRX14USBDLL.cpp – This source file contains the entry point for the DLL. It also defines all the
functions of CRX14USB.DLL.
CRX14USBDLL.h – This is the header file for whole DLL. All files within this DLL are compiled with the
CRX14USBDLL_EXPORTS symbol defined on the command line. This symbol should not be defined on any project that uses this DLL. In this way, any other project, whose source files include this file, see CRX14USBDLL_API functions as being imported from a DLL. Meanwhile, this DLL sees symbols, defined with this macro, as being exported.
ErrorCodes.h – This file contains the definitions of the return error codes that are used by the return
functions of CRX14USB.DLL.
StdAfx.cpp – This source file contains the standard “Include” statements.
StdAfx.h – This is the Include file for the standard system “Include” statements, and the project-
specific “Include” statements that are frequently used, but infrequently changed.
CRX14USBDLL.dsp – This is the Microsoft Developer Studio Project File.
CRX14USBDLL.dsw – This is the Microsoft Developer Studio Workspace File.
February 2004 1/3
AN1874 - APPLICATION N OTE
The DLL package also contains a documentation file, in the .\doc\ directory:
CRX14USBDLL_DOC.chm – This is the Compiled HTML Help file. It can be opened, with no need on
additional software, on any PC that has a Microsoft Windows 98/2000/XP operating system. This hypertext documentation includes descriptions of all the source files, descriptions of all the functions,
and a short “getting started” help section. Four other directories need mentioning: The .\include\ and .\lib\ directories contain “Include” and library files that might be convenient for the us-
er’s own compilation. The user should include paths to these directories in his project directory settings. The .\debug\ and .\release\ directories receive the outputs of particular compilations. The .\debug\ direc-
tory contains a library dedicated for debug and test purposes, and the .\release\ directory is dedicated for the final release of the developed application. The most important files, here, are following:
CRX14USB.dll – This is the particular DLL file that has been compiled in release or debug form.
CRX14USB.lib – This is the library file that is used for the static importing of the particular DLL.

FURTHER INFORMATION

Additional information about this project is given in the .\doc\CRX14USBDLL_DOC.chm file that was mentioned above. In this h ypertext file, the user can find detailed descriptions of ea ch of the functions, along with source code references, installation notes , DLL usage overview, and a short case study. The short case study involves a simple C code example, that can help get the user started on the first steps of working with the CRX14 USB reader: accessing, reading and writing to STMicroelectronics short range contactless memory devices.

REVISION HIST ORY

Table 1. Document Revision History

Date Version Revision Details
24-Feb-2004 1.0 First Issue
2/3
Loading...
+ 1 hidden pages