Symbian3/PDK/Source/GUID-C661B40F-1439-587F-9E8E-DB2DFC79C040.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 3 46218c8b8afa
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608

<?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-9AE254D4-AA60-579E-8D9D-F2797106A413.dita#GUID-9AE254D4-AA60-579E-8D9D-F2797106A413/GUID-1B59A40C-D023-5555-8E5E-DF18D653D321">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 OS 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>