bsptemplate/asspandvariant/template_assp/iic/iic_psl.h
author Mike Kinghan <mikek@symbian.org>
Thu, 25 Nov 2010 14:35:45 +0000
branchGCC_SURGE
changeset 305 1ba12ef4ef89
parent 0 a41df078684a
permissions -rw-r--r--
Enhance the base/rom extension to generate the symbol file of the rom built. The symbol file is placed in epoc32/rom/<baseport_name>, along with the rom log and final oby file.

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/


#ifndef __IIC_PSL_H__
#define __IIC_PSL_H__

const TInt KIicPslNumOfChannels = 3; // Arbitrary value - represents the number of channels supported

const TUint KIicPslInterruptsAll = 0xFF;	// Arbitrary value, for template
const TUint KIicPslRxInterrupt = 0x1;		// Arbitrary value, for template
const TUint KIicPslTxInterrupt = 0x2;		// Arbitrary value, for template

const TInt KTimeoutValue = 5;         // guard-timer timeout value (in ms)

// Array of pointers to the channels that are created by the PSL.
// The array is used to register these channels with the IIC Bus Controller
extern DIicBusChannel* ChannelPtrArray[KIicPslNumOfChannels];


// A bit-field to store the current mode of operation
struct TIicOperationType
    {
    enum TOperation
        {
        ENop             = 0x00,
        ETransmitOnly    = 0x01,
        EReceiveOnly     = 0x02,
        ETransmitReceive = 0x03
        };

    struct TOp
        {
        TUint8 iIsTransmitting : 1;
        TUint8 iIsReceiving    : 1;
        TUint8 iRest           : 6;
        };

    union
        {
        TOp iOp;
        TUint8 iValue;
        };
    };

#endif /*__IIC_PSL_H__*/