Adaptation/GUID-C661B40F-1439-587F-9E8E-DB2DFC79C040.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-C661B40F-1439-587F-9E8E-DB2DFC79C040" xml:lang="en"><title>HAL Groups</title><shortdesc>Description of HAL groups to add new attributes.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>You can extend <xref href="GUID-9AE254D4-AA60-579E-8D9D-F2797106A413.dita#GUID-9AE254D4-AA60-579E-8D9D-F2797106A413/GUID-366CC4B8-C6BD-5DCC-B55D-6D87CD5C8E64">HAL groups</xref> to add new attributes and new types of hardware. </p>
<section id="GUID-7ACAB5F0-08A8-4D53-9F47-9E77642F7337"><title>Extending
an existing hardware type</title> <p>Each HAL group has an associated
set of function numbers. For example, the enumerators of <codeph>TDisplayHalFunction</codeph>, in <filepath>u32std.h</filepath> define the functions associated
with the HAL group <codeph>EHalGroupDisplay</codeph>. </p> <p>In this
specific case, new state can be represented by a new function number,
and by changing the <xref href="GUID-124AC7EE-E227-5358-A755-628FFE257250.dita">HAL handler implementation</xref> to deal with the new function number. </p> <p>It is
important to note that any new function numbers should not follow
consecutively from those defined by Symbian. Instead, choose high
values so that they are guaranteed not to clash with any future Symbian
extensions. Symbian will always use new values that follow consecutively
from previous Symbian defined values. </p> </section>
<section id="GUID-A819D9EA-A16F-4806-B8E8-C7ED008C6D31"><title>New
hardware type</title> <p>Although up to 32 HAL groups can be defined,
Symbian platform does not use all 32. This leaves some values that
can be used for new hardware. </p> <p>In this case choose a HAL group
number at the high end of the range, so that it is guaranteed not
to clash with any future Symbian extensions. Symbian will always use
new values that follow consecutively from previous Symbian defined
values. </p> </section>
</conbody></concept>