Adaptation/GUID-D7D7615F-B67D-44D0-82DF-24853159A114.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 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: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-D7D7615F-B67D-44D0-82DF-24853159A114" xml:lang="en"><title>Baseport Template Client Interface Guide</title><shortdesc>Provides a basic framework consisting of base parts of
the Symbian platform.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The Baseport Template platform service provide an interface to
the kernel-side client for hardware-specific functions (for example,
GPIO, DMA, IIC, USB Client Controller) that are used by the kernel. </p>
<section id="GUID-CEE49D22-800F-4906-9634-ED90D6326CD4">         
   <title>Interface class</title>             <p>The client interface
for the Baseport Template platform service is:<table id="GUID-04372BCC-FF57-454B-808A-6CE36F305FD1">
<tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
<thead>
<row>
<entry valign="top">API</entry>
<entry valign="top">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita"><apiname>TemplateAssp</apiname></xref></p></entry>
<entry><p>Provides common peripheral control functions such as power,
bootstrap, keymap, keyboard and sound that other extensions and device
drivers can use</p></entry>
</row>
</tbody>
</tgroup>
</table></p><p>The Baseport Template interface provides the following
functions.</p><table id="GUID-F62F1769-B473-4CD7-AFB8-B87EDED9473F">
<tgroup cols="3"><colspec colname="col1"/><colspec colname="COLSPEC0" colwidth="1.00*"/><colspec colname="col2"/>
<thead>
<row>
<entry valign="top">Function</entry>
<entry valign="top">Return Type</entry>
<entry valign="top">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-D6F36994-1F14-38FA-8030-F958BEFA31B5"><apiname>TemplateAssp::Init1()</apiname></xref></p></entry>
<entry><codeph>void</codeph></entry>
<entry><p>Initialize the ASSP interrupt controller</p></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-3B629F63-8F31-32E9-9953-3D01F8A979BB"><apiname>TemplateAssp::Init3()</apiname></xref></p></entry>
<entry><codeph>void</codeph></entry>
<entry><p>Called in the context of the supervisor thread</p></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-D3897D91-4127-3A9C-B996-84AE19CE1227"><apiname>TemplateAssp::StartupReason()</apiname></xref></p></entry>
<entry><codeph>TMachineStartupType</codeph></entry>
<entry><p>Return the Startup reason of the Super Page (set up by Bootstrap)</p></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-69BD314C-DB6D-326C-9B6B-7ACA5D2D6109"><apiname>TemplateAssp::MsTickPeriod()</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
<entry><p>Obtain the period of System Tick timer in microseconds</p></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-371B9277-7E59-3B52-B8FA-C83D02192F34"><apiname>TemplateAssp::SystemTimeInSecondsFrom2000(TInt&amp;
aTime);</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
<entry><p>Obtain System Time from the RTC</p></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-47B670EB-CD22-3CBE-A20C-5E5752207ED0"><apiname>TemplateAssp::SetSystemTimeInSecondsFrom2000(TInt
aTime)</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
<entry><p>Obtain Adjust the RTC with new System Time</p></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-10356DD9-911A-3213-964E-90ED73DEDBE0"><apiname>TemplateAssp::NanoWaitCalibration()</apiname></xref></p></entry>
<entry><codeph>TUint32</codeph></entry>
<entry><p>Obtain the time it takes to execute two processor instructions</p></entry>
</row>
</tbody>
</tgroup>
</table>         </section>
<section id="GUID-353FB844-F423-48C8-A992-4B0B509B6717"><title>Pure
Virtual Functions for derivation by variant</title><p> These are the
functions whose implementation are not provided in the class, but
the behavior can be overridden within an inheriting class by a function
with the same return type.</p><p><b>External interrupt handling functions</b> are used by second-level interrupt controllers at variant level.</p><table id="GUID-16FE0DE3-1096-47A0-A7FE-9989F73ABF6C">
<tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
<thead>
<row>
<entry valign="top">Functions</entry>
<entry valign="top">Return Type</entry>
</row>
</thead>
<tbody>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-40F10C5C-912E-3433-B01E-9F4FC8448AF1"><apiname>TemplateAssp::InterruptBind(TInt anId, TIsr anIsr,
TAny* aPtr)</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-27DBAA7C-CF52-3167-84ED-BB1BDA2160F9"><apiname>TemplateAssp::InterruptUnbind(TInt anId)</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-EA574990-A3F5-3127-9052-477AF80746B5"><apiname>TemplateAssp::InterruptEnable(TInt anId)</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-C9ED2A0E-6725-3230-AF82-83E3CE67931B"><apiname>TemplateAssp::InterruptDisable(TInt anId)</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-E180DE9E-7F38-3552-83C1-E0E99CC61C16"><apiname>TemplateAssp::InterruptClear(TInt anId)</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
</tbody>
</tgroup>
</table><p><b>USB client controller functions</b> are the called by
the USB PSL, and to be implemented by the variant .</p><table id="GUID-C68B5AA4-DCBA-4380-A317-0DF7DB24A2C7">
<tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
<thead>
<row>
<entry valign="top">Functions</entry>
<entry valign="top">Return Type</entry>
</row>
</thead>
<tbody>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-C139AF42-D777-3E24-8C51-EE9713382984"><apiname>TemplateAssp::UsbClientConnectorDetectable()</apiname></xref></p></entry>
<entry><codeph>TBool</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-4579D639-36EF-3F9B-B61F-0617737AEF6B"><apiname>TemplateAssp::UsbClientConnectorInserted()</apiname></xref></p></entry>
<entry><codeph>TBool</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-7F3C5DE4-1271-3D01-8851-F98B2C65D902"><apiname>TemplateAssp::RegisterUsbClientConnectorCallback(TInt
(*aCallback)(TAny*), TAny* aPtr)</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-F790857E-0ADD-3867-BC31-2465682F759F"><apiname>TemplateAssp::UnregisterUsbClientConnectorCallback()</apiname></xref></p></entry>
<entry><codeph>void</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-D1145A00-6288-353B-B12B-FF975A34543C"><apiname>TemplateAssp::UsbSoftwareConnectable()</apiname></xref></p></entry>
<entry><codeph>TBool</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-34F11331-62B8-3F1E-9C53-55A4727926AE"><apiname>TemplateAssp::UsbConnect()</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
<row>
<entry><p><xref href="GUID-E893165C-0E62-3AC6-98BA-227E104B672E.dita#GUID-E893165C-0E62-3AC6-98BA-227E104B672E/GUID-5C7895A2-323D-34C5-BFAB-3FF470CB3503"><apiname>TemplateAssp::UsbDisconnect()</apiname></xref></p></entry>
<entry><codeph>TInt</codeph></entry>
</row>
</tbody>
</tgroup>
</table></section>
</conbody><related-links>
<link href="GUID-57989FF8-5E8F-4C8A-9D38-169AFCA4C078.dita"><linktext>Baseport
Template Implementation Guide</linktext></link>
</related-links></concept>