|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.dalsemi.system.BitPort
This class allows bit manipulation of available processor port pins and provides abstracted methods of manipulating bits in memory mapped IO addresses through the DataPort class.
| Field Summary | |
int |
latchValue
|
static byte |
Port3Bit0
|
static byte |
Port3Bit1
|
static byte |
Port3Bit2
|
static byte |
Port3Bit3
|
static byte |
Port3Bit4
|
static byte |
Port3Bit5
|
static byte |
Port5Bit0
|
static byte |
Port5Bit1
|
static byte |
Port5Bit2
|
static byte |
Port5Bit3
|
| Constructor Summary | |
BitPort(byte bitname)
Create a BitPort object using the bitname specified. |
|
BitPort(DataPort port)
Create a BitPort object using the DataPort object specified. |
|
| Method Summary | |
void |
clear()
Clear the port pin. |
void |
clear(int bitpos)
Clear the specified bit. |
int |
read()
Read the port pin. |
int |
readBit(int bitpos)
Read the specified pin Side effect: Will update all bits in the byte. |
int |
readLatch()
Read the latch value |
int |
readLatch(int bitpos)
Read the latch of the specified pin |
void |
set()
Set the port pin. |
void |
set(int bitpos)
Set the specified bit. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final byte Port5Bit0
public static final byte Port5Bit1
public static final byte Port5Bit2
public static final byte Port5Bit3
public static final byte Port3Bit0
public static final byte Port3Bit1
public static final byte Port3Bit2
public static final byte Port3Bit3
public static final byte Port3Bit4
public static final byte Port3Bit5
public int latchValue
| Constructor Detail |
public BitPort(byte bitname)
bitname - Descriptor of bit to twiddlepublic BitPort(DataPort port)
port - An eight bit wide field of bits to twiddle| Method Detail |
public void set()
public void clear()
public int read()
public int readLatch()
public void set(int bitpos)
bitpos - Value 0-7 of bit to setpublic void clear(int bitpos)
bitpos - Value 0-7 of bit to clearpublic int readBit(int bitpos)
bitpos - Value 0-7 of bit to read.public int readLatch(int bitpos)
bitpos - Value 0-7 of bit to read.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||