Introduction, Calibre – Calibre UK UCA93 User Manual

Page 7

Advertising
background image

CALIBRE

Issue 1.0

Page 4

01/07/03

LIBRARIES FOR PROGRAMMING IN MICROSOFT WINDOWS ENVIRONMENTS

3.1.

Introduction

Each utility is documented in a standard format which lists its name, usage, function and effect on the
Adapter is given. The Adapter should be setup prior to any data transfer.

Within the DLL there are two versions of some functions e.g. SendAddress and SendAddressNoStatus,
the first provides legacy support for software written for other Calibre UK Ltd I2C products, the second
format does not return the status.

3.1.1.

Legacy Function

The following changes have had to be made to the legacy functions

1) The parameters passed to the setup function are specific to the Adapter

2) The status wait has been removed and is now controlled by hardware, the Adapter will wait up

to 500 micro seconds before returning an error code indicating that the transfer failed.

3) The Setnack is now changed on the read you require the acknowledge state to change NOT on

the byte before.

4) There is no longer a need to perform a Trash read after a restart.

3.1.2.

No Status Functions

The xxNoStatus functions provide faster transfers as they do not require the USB bus to change
direction between writing and reading. The function prototypes are included in the manual but care
MUST be taken when using these functions not to corrupt the I

2

C with uncontrolled transfers. These

functions are ONLY to be used when users are 100% certain that all devices on the I

2

C WILL

acknowledge their address and that there is a single master.

PLEASE NOTE NO TECHNICAL SUPPORT IS AVAILABLE FOR THESE FUNCTIONS

Calibre UK recommend using the block functions detailed below

3.1.3.

Block Functions

To aid users wishing to transfer data without the complication of having to write a I

2

C transfer protocol a

number of Block functions have been added. DO NOT exceed the data transfer limitations described in
the individual functions as this will cause errors and data corruption.

C and C++ users will undoubtedly wonder why they are passing data to the DLL when they could much
more efficiently pass a pointer, unfortunately not all the development environments this Adapter will be
used on support pointers.

Advertising