Adaptation/GUID-D003030D-8506-4210-9194-7A3819205D68.dita
changeset 15 307f4279f433
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Adaptation/GUID-D003030D-8506-4210-9194-7A3819205D68.dita	Fri Oct 15 14:32:18 2010 +0100
@@ -0,0 +1,29 @@
+<?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-D003030D-8506-4210-9194-7A3819205D68" xml:lang="en"><title>Hardware
+Registers</title><shortdesc>This document describes how device drivers use hardware registers.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
+<section id="GUID-47A733FB-8AC9-40A0-B879-C8C01B0AB1ED">           <p>The
+APIs to access hardware peripheral registers are provided by a Symbian base
+port. For example, the base port for the OMAP 2420 provides the <codeph>TOmap::SetRegister()</codeph> and <codeph>TOmap::GetRegister()</codeph> functions
+to access its peripheral controller registers. Peripheral drivers would generally
+use these APIs. Some examples: </p> <ol id="GUID-78156A20-8B2F-52FB-8A9F-159B6EE8714E">
+<li id="GUID-330A1D4C-E054-5DC3-A1F5-D85A9F600834"><p>To set the UART LCR
+register: </p> <codeblock id="GUID-35EE35C4-B89B-52D1-AC25-13C63BA55435" xml:space="preserve">TOmap::SetRegister8(iPortAddr+KHoUART_LCR, KHbUartLCRFifoConfig);</codeblock> </li>
+<li id="GUID-06BE62D4-4ED7-5186-A191-9908C10B1C7E"><p>To get the UART MDR
+register: </p> <codeblock id="GUID-64F8101B-CDDF-57E9-93D4-08B4BBA117CB" xml:space="preserve">TOmap::Register8(iPortAddr+KHoUART_MDR1)</codeblock> </li>
+<li id="GUID-D549BAC4-5842-5E8D-B086-28A5366DBC4D"><p>To modify only the specified
+bits of the register: here, the UART LCR register bit 6 is being set to 0
+(LCR[6] = 0) </p> <codeblock id="GUID-C705FB36-1D4E-557F-B30D-6B6AD21E5B5C" xml:space="preserve">TOmap::ModifyRegister8(iPortAddr+KHoUART_LCR,
+                  (TUint8)KHtUartLCRBreakEnable,
+                  (TUint8)KSetNone);</codeblock> </li>
+</ol>     </section>
+</conbody></concept>
\ No newline at end of file