fdhwlib
2.0.25
|
#include <baseregisteritem.h>
Definition and access to bit fields.
Definition at line 34 of file baseregisteritem.h.
hw4::BaseRegisterItem::BaseRegisterItem | ( | BaseRegister * | reg, |
const char * | name = 0 , |
||
unsigned long | low = 0 , |
||
unsigned long | len = 32 |
||
) |
Defines an item of an register.
hw4::BaseRegisterItem::BaseRegisterItem | ( | BaseRegisterItem * | group, |
const char * | name, | ||
unsigned long | low, | ||
unsigned long | len | ||
) |
Defines an item within a existing item.
The parent item is in this case called group (of bits)
virtual hw4::BaseRegisterItem::~BaseRegisterItem | ( | ) | [virtual] |
virtual unsigned long hw4::BaseRegisterItem::get | ( | unsigned long | data | ) | [virtual] |
Get the data from the given value.
int hw4::BaseRegisterItem::getByteShift | ( | ) |
virtual unsigned long hw4::BaseRegisterItem::getCache | ( | int | elem = 0 | ) | [virtual] |
Get register item from register cache using the data of the last access.
BaseRegisterItem* hw4::BaseRegisterItem::getGroup | ( | ) |
Return the group the item belongs to.
int hw4::BaseRegisterItem::getLength | ( | ) |
int hw4::BaseRegisterItem::getLowBit | ( | ) |
unsigned long hw4::BaseRegisterItem::getMask | ( | ) |
const char* hw4::BaseRegisterItem::getName | ( | ) |
Return the name of the register item.
virtual bool hw4::BaseRegisterItem::isActive | ( | int | elem = 0 | ) | [virtual] |
Check if the status bit is active.
This function is introduced for better readablilty for items of 1bit length. The data is always taken from cache.
virtual bool hw4::BaseRegisterItem::isDisabled | ( | int | elem = 0 | ) | [virtual] |
Check if the feature is disabled.
This function is introduced for better readablilty for items of 1bit length. The data is always taken from cache.
virtual bool hw4::BaseRegisterItem::isEnabled | ( | int | elem = 0 | ) | [virtual] |
Check if the feature is enabled.
This function is introduced for better readablilty for items of 1bit length. The data is always taken from cache.
virtual bool hw4::BaseRegisterItem::isInactive | ( | int | elem = 0 | ) | [virtual] |
Check if the status bit is inactive.
This function is introduced for better readablilty for items of 1bit length. The data is always taken from cache.
virtual unsigned long hw4::BaseRegisterItem::read | ( | int | elem = 0 | ) | [virtual] |
Read register item from hardware.
Reimplemented in hw4::FltSignedItem.
virtual void hw4::BaseRegisterItem::setCache | ( | unsigned long | data | ) | [virtual] |
Add item data to register cache.
After havibg compiled the complete data the cache has to be writen to hardware.
virtual void hw4::BaseRegisterItem::setCache | ( | int | elem, |
unsigned long | data | ||
) | [virtual] |
Add item data to register cache.
After havibg compiled the complete data the cache has to be writen to hardware.
virtual void hw4::BaseRegisterItem::write | ( | unsigned long | data | ) | [virtual] |
Write the item to hardware.
Reimplemented in hw4::SltSetSecondCounterItem.
virtual void hw4::BaseRegisterItem::write | ( | int | elem, |
unsigned long | data | ||
) | [virtual] |
Write the item to hardware.
unsigned long hw4::BaseRegisterItem::byteShift [private] |
Shift needed to address memory entries that span more than one (32bit) word.
So today (2009-04, for v4) addressShift or word32Shift would be a better name ... -tb-
Old comment: Byte shift needed to address memory entries that span more than one byte
Definition at line 111 of file baseregisteritem.h.
BaseRegisterItem* hw4::BaseRegisterItem::group [private] |
Link to the parent bit group.
Bit fields like the trigger source form group of bits.
Definition at line 127 of file baseregisteritem.h.
unsigned long hw4::BaseRegisterItem::len [private] |
Length of the bit field .
Definition at line 117 of file baseregisteritem.h.
unsigned long hw4::BaseRegisterItem::low [private] |
Lowest bit of the bitfield in the register (0..31).
Definition at line 104 of file baseregisteritem.h.
unsigned long hw4::BaseRegisterItem::mask [private] |
Mask (calculated from the length).
Definition at line 114 of file baseregisteritem.h.
const char* hw4::BaseRegisterItem::name [private] |
Name of the bit field.
Definition at line 101 of file baseregisteritem.h.
BaseRegister* hw4::BaseRegisterItem::reg [private] |
Link to the parent register.
Definition at line 121 of file baseregisteritem.h.