|
|||||||||
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, SMC Ethernet
controller port pins and provides abstracted methods of manipulating bits
in memory mapped IO addresses through the DataPort
class.
DataPort
Field Summary | |
static byte |
ETH_EEDO
SMC EEDO, output ONLY, pin 4. |
static byte |
ETH_EESK
SMC EESK, output ONLY, pin 7. |
static byte |
ETH_IOS0
SMC IOS0, input ONLY, pin 98. |
static byte |
ETH_IOS1
SMC IOS1, input ONLY, pin 99. |
static byte |
ETH_IOS2
SMC IOS2, input ONLY, pin 1. |
int |
latchValue
The last written value. |
static byte |
Port3Bit0
P3.0, RXD0, "serial 0", pin 4. |
static byte |
Port3Bit1
P3.1, TXD0, "serial 0", pin 5. |
static byte |
Port3Bit2
P3.2, /INT0, /SMCINT (Ethernet interrupt), pin 6. |
static byte |
Port3Bit3
P3.3, /INT1, /EXTINT (External interrupt), pin 7. |
static byte |
Port3Bit4
P3.4, T0, /SMCRST (Ethernet Reset), pin 10. |
static byte |
Port3Bit5
P3.5, T1, INTOW (Internal 1-Wire), pin 11. |
static byte |
Port5Bit0
P5.0, C0TX, I2C SCL, pin 21. |
static byte |
Port5Bit1
P5.1, C0RX, I2C SDA, pin 20. |
static byte |
Port5Bit2
P5.2, C1RX, RXD1, DS2480 RX, "serial 1", pin 19. |
static byte |
Port5Bit3
P5.3, C1TX, TXD1, DS2480 TX, "serial 1", pin 18. |
static byte |
Port5Bit4
P5.4, /PCE0, pin 17. |
static byte |
Port5Bit5
P5.5, /PCE1, pin 16. |
static byte |
Port5Bit6
P5.6, /PCE2, pin 15. |
static byte |
Port5Bit7
P5.7, /PCE3, pin 14. |
Constructor Summary | |
BitPort(byte bitname)
Creates a new instance of BitPort using the bit specified. |
|
BitPort(DataPort port)
Creates a new instance of BitPort using the DataPort object specified. |
Method Summary | |
void |
clear()
Clears the port pin low. |
void |
clear(int bitpos)
Clears the specified bit low. |
int |
read()
Reads the port pin. |
int |
readBit(int bitpos)
Reads the specified pin. |
int |
readLatch()
Reads the current latch value. |
int |
readLatch(int bitpos)
Reads the latch value of the specified pin. |
void |
set()
Sets the pin high. |
void |
set(int bitpos)
Sets the specified bit high. |
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 Port5Bit4
public static final byte Port5Bit5
public static final byte Port5Bit6
public static final byte Port5Bit7
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 static final byte ETH_EESK
public static final byte ETH_EEDO
public static final byte ETH_IOS0
public static final byte ETH_IOS1
public static final byte ETH_IOS2
public int latchValue
Constructor Detail |
public BitPort(byte bitname)
BitPort
using the bit specified.bitname
- descriptor of bit to twiddle (e.g. Port5Bit0)public BitPort(DataPort port)
BitPort
using the DataPort
object specified.port
- An eight bit wide field of bits to twiddleMethod Detail |
public void set()
public void clear()
public int read()
public int readLatch()
read
method.public void set(int bitpos) throws IllegalAddressException
bitpos
- value 0-7 of bit to setDataPort
reports an exception during the operationpublic void clear(int bitpos) throws IllegalAddressException
bitpos
- value 0-7 of bit to clearDataPort
reports an exception during the operationpublic int readBit(int bitpos) throws IllegalAddressException
bitpos
- value 0-7 of bit to read.DataPort
reports an exception during the operationpublic int readLatch(int bitpos)
read
method.bitpos
- value 0-7 of bit to read.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |