diff -r 000000000000 -r bde4ae8d615e os/kernelhwsrv/kerneltest/e32test/examples/exdriver/exdriver_pio/inc/expio.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/kernelhwsrv/kerneltest/e32test/examples/exdriver/exdriver_pio/inc/expio.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,103 @@ +// Copyright (c) 2007-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: +// This file defines the interface provided by the driver to the user. +// It will be included both in the application (user) and the driver (kernel). +// This file typically defines the RBusLogicalChannel derived class that will +// inturn provide the driver API to the user application. +// ifndef __EXPIO_H__ will resolve the multiple inclusion of this header +// file in different source files. If the file is already included, then the +// following switch will not re-include the file. +// +// + +#ifndef __EXPIO_H__ +#define __EXPIO_H__ + +// include files +// +// e32ver.h (for KE32BuildVersionNumber), e32cmn.h and e32std.h are already +// included in d32comm.h and hence not repeating here. +// +#include + +// Literal string descriptor constants for driver name. These descriptors +// are used by the driver to associate a name for registering to the +// Symbian OS. LDD will have a name to associate with. +// +_LIT(KDriverName, "d_expio"); + +/** + User interface for tutorial driver + + RExDriverChannel class is derived from the RBusLogicalChannel and provides + the interface for user. User application accesses the driver functionality + using only these API. + */ +class RExDriverChannel:public RBusLogicalChannel + { +public: + // TVer is an enumeration for the version related information. Driver will + // need to set and validate version related information while installing. + // Version numbers are validated to check if this version of driver as + // expected by the client/user application + // + enum TVer + { + EUartMajorVersionNumber=1, // Major number for driver + EUartMinorVersionNumber=0, // Minor number for device + EUartBuildVersionNumber=KE32BuildVersionNumber // Build version number for driver + }; + // TControl is the enumeration for control and synchronous messages + // supported by the driver. User application can request for any of + // the following control messages to the driver through DoContro() + // API provided by the RBusLogicalChannel class. + // + enum TControl // Synchronous control messages used with DoContro() + { + EControlCaps, // Get the channel capabilities on uart + EControlSetConfig, // Configure the device (uart) + EControlTransmitData, // Transmit data over the device (uart) + EControlReceiveData, // Receive the data from the device (uart) + ENumRequests, // Number of synchronous control requests + EAllRequests = (1<