diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-D003030D-8506-4210-9194-7A3819205D68.dita --- /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 @@ + + + + + +Hardware +RegistersThis 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:

    +
  1. To set the UART LCR +register:

    TOmap::SetRegister8(iPortAddr+KHoUART_LCR, KHbUartLCRFifoConfig);
  2. +
  3. To get the UART MDR +register:

    TOmap::Register8(iPortAddr+KHoUART_MDR1)
  4. +
  5. 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);
  6. +
+
\ No newline at end of file