This document describes how device drivers use hardware registers.
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 TOmap::SetRegister() and TOmap::GetRegister() functions to access its peripheral controller registers. Peripheral drivers would generally use these APIs. Some examples:
To set the UART LCR register:
TOmap::SetRegister8(iPortAddr+KHoUART_LCR, KHbUartLCRFifoConfig);
To get the UART MDR register:
TOmap::Register8(iPortAddr+KHoUART_MDR1)
To modify only the specified bits of the register: here, the UART LCR register bit 6 is being set to 0 (LCR[6] = 0)
TOmap::ModifyRegister8(iPortAddr+KHoUART_LCR, (TUint8)KHtUartLCRBreakEnable, (TUint8)KSetNone);
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.