diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-98210124-0B65-4679-BB3A-E94B9999365C.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-98210124-0B65-4679-BB3A-E94B9999365C.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,143 @@ + + + + + +IIC Client Interface GuideThis document explains how to use the IIC client interface +API. +
Introduction

This guide describes how to use the IIC client interface API.

+
Channels

In this document, a channel is a multi-wire bus with a two or +more devices connected to it. At least one of the devices can act +as the master.

+
Modes +of operation

There are three possible modes that a device +can be in as regards to the IIC client interface API (regardless of +the underlying two-wire bus that is being used ):

+ + + +

Mode

+

Description

+
+ + + +

Master

+

The device is responsible for initializing and terminating +the data transfer.

+
+ +

Slave

+

The device carries out the transfer initialized by a another +device acting as a master.

+
+ +

MasterSlave

+

The device can perform both master and slave roles.

+
+ + +
+
Transactions

A single exchange of data in one direction is known as a transfer.

A list of transfers is known as a transaction.

Transactions +can be performed in half-duplex, or , full-duplex (if the underlying +bus supports it).

+
Transaction +preamble

In certain instances, some pre-processing might +be required by the devices before a transaction can occur.

This +can be done by the transaction preamble functionality, which executes +immediately before the transaction is performed. This takes the form +of a function.

the following restrictions apply to this +function:

    +
  • No spin locks are to be used.

  • +
  • There are no block or waiting on a fast mutex operations.

  • +
  • There are no calls to code that either uses spin locks, waits +or blocks a fast mutex.

  • +

This is for a device that is in master mode.

+
Extended +transactions

This is where a number of separate transactions +are linked together. It is used, for example, in situations where +it is not known in advance how big the transaction will be.

This is for a device that is in master mode.

+
Controller +and controller-less operation

Added to the above functionality, +the IIC platform service API has two modes of operation:

    +
  • With-controller and

  • +
  • Controller-less

  • +

Controller operation is used in a situation where multiple +device drivers can communicate with multiple channels. In controller-less +operation, the link between a device driver and a channel is fixed.

In controller-less operation, the mode of the channel is set at +build time, buy using the following macros in the relevant mmp files:

+ + + +

Macro

+

Description

+
+ + + +

MASTER_MODE

+

Specifies that the device is to act as a master.

+
+ +

SLAVE_MODE

+

Specifies that the device is to act as a slave.

+
+ + +
+IIC with-controller operation + + +IIC controller-less operation + +
+
Interface +classes

The class that is used for the client interface +depends on whether the IIC controller is to be used or not.

If the IIC Controller is to be used, then the client interface API +class is:

+ + + +

Name

+

Description

+
+ + + +

IicBus

+

Client interface API for the IIC component.

+
+ + +

If the IIC controller is not to be used, then the client +interface API classes are:

+ + + +

Name

+

Description

+
+ + + +

DIicBusChannelMaster

+

Client interface API for the master channel operation.

+
+ +

DIicBusChannelSlave

+

Client interface API for the slave channel operation.

+
+ +

DIicBusChannelMasterSlave

+

Client interface API for the master slave channel operation.

+
+ + +
+
\ No newline at end of file