diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-052F58B7-117B-5EDD-A3D5-CB0DE6A4E239.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-052F58B7-117B-5EDD-A3D5-CB0DE6A4E239.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,75 @@ + + + + + +IIC Kernel-side +Implementation Guide: Generic ConsiderationsThis document explains how to implement an interface from Symbian +platform to an IIC bus. +
Purpose

This document covers information which +is generic to master and slave channel implementation

Intended +Audience

Base porting engineers.

Introduction

IIC +buses (serial inter-chip buses) are a class of bus used to transmit non time-critical +data between components of a hardware system.

+
Generic architecture

Different IIC buses have a +large amount of functionality in common, but some functionality is specific +to individual implementations. For this reason, the Symbian platform IIC library +has an architecture consisting of two layers, the Platform Independent Layer +(PIL) and the Platform Specific Layer (PSL). The Platform Independent Layer +is a set of classes which encapsulate generic functionality and have been +implemented for you. The Platform Specific Layer is an interface which you +must implement yourself to encapsulate the functionality specific to the platform +you are working on.

You implement the Platform Specific Layer by subclassing +the classes of the Platform Independent Layer and writing certain functions +using the machine instructions of your hardware. To access the hardware you +are strongly recommended to use the Symbian platform API (e.g. AsspRegister to +access hardware registers, or GPIO to access GPIO pins).

An +IIC channel operates in one of two modes, master and slave, and there are +separate master and slave APIs to be implemented. In master mode, a channel +and a client communicating with that channel execute in two separate threads. +In slave mode there is only one thread for both channel and client.

The +platform specific and platform independent APIs assume an interrupt-driven +approach to implementation. An event on hardware triggers an interrupt, which +then signals this event to the channel thread (where client is master) or +client thread (where client is slave). This means that implementation involves +writing interrupt service routines (ISRs) and a DFC queue to hold the callbacks +which respond to them. A channel responds to interrupts by requesting notification +of a hardware event, specified in the form of a bitmask called a trigger (slave) +or reacting to it by receiving or transmitting data (master) or by various +other possible responses. The possible triggers and possible responses to +them constitute a state machine. A master channel conforms to a simple state +machine which varies from one hardware implementation to another. A slave +channel conforms to a more complex state machine, generic to all implementations, +which is explained in this document.

Symbian platform provides an +example of an IIC channel in the Naviengine reference implementatin which +you are encouraged to consult and use as a model.

API Conditions

The +same conditions apply to all APIs, both master and slave. They are:

    +
  • Kernel must be unlocked.

  • +
  • No fast mutex must be +held.

  • +
  • Interrupts must be enabled.

  • +
  • APIs are called from +thread context (not from NULL thread or DFC thread 1).

  • +
+
+IIC Kernel-side +Implementation Guide: Master Channel +IIC Kernel-side +Implementation Guide: Slave Channel +Client of +Master Channel Implementation Tutorial +Client of +Slave Channel Implementation Tutorial +IIC Guide + +SPI Technology +Guide +I2C Technology +Guide +
\ No newline at end of file