diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-6C74A8B4-50B6-486C-A75F-A50636F4C566.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-6C74A8B4-50B6-486C-A75F-A50636F4C566.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,47 @@ + + + + + +Register Access OverviewProvides a summary of the Register Access platform service. +

The Register Access platform service is intended for use in writing +device drivers. Writing device drivers involves frequent access to +hardware registers for reading, writing and modifying them.

+
+ What is a register

A register is +a memory location on the ASSP hardware to store data that relates +to the operation of that hardware. For example, a register can be +a counter, or a bit field, or the next sequence number or the next +byte or word of data that has arrived over a bus.

The Symbian +platform provides access functions for registers that have the following +sizes:

    +
  • 8–bit

  • +
  • 16–bit

  • +
  • 32–bit

  • +
  • 64–bit

  • +

+
What +functions are available

There are three types of function +provided for register access:

    +
  • Read - get the value of a register

  • +
  • Write - write a value to a register

  • +
  • Modify - use bitmasks to clear or set specific +bits in a register

  • +

Each function takes a first argument of a TLinAddr which is an address. The device driver only needs to know the address, +and the size of the register. The implementation of the Register Access +must map the exposed physical hardware register to a linear address.

Each type of function (read, write, modify) has 8–bit, 16–bit, +32–bit and 64–bit versions.

The Modify functions +take two bitmasks as parameters, to specify which bits to clear to +zero (clear mask) and which bits to set to one (set mask). This means +that you could call Modify16(myaddress, 0xC000,0x000F) and the top two bits would be set to zero, the bottom four bits +would be set to one, and the ten bits in the middle would retain their +current value.

See Register Access Client +Interface Guide for more details on each function and how to +use them.

+
\ No newline at end of file