|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.mbari.siam.moos.deployed.LddMaster
public class LddMaster
LddMaster provides an application level interface to the StrongARM LDD IO pins, which are similar to GPIO pins, except that they have no interrupt capabilities. The LddMaster accesses these ports using the character special file (/dev/lddio) interface presented by the sa1100lddio.o (lddio) Linux kernel module. It is possible to read several different driver parameters in addition to reading the IO port itself. The read mode of the lddio module sticky; when the read mode is set, subsequent reads will read the parameter specified. To read a different parameter, the read mode must be explicitly set. A number of convenience functions are provided to hide this behavior; the sticky read mode is relevant when using readLdd directly.
| Field Summary | |
|---|---|
static int |
LDD_ATTN_MSP430
MSP430 attention bit |
static int |
LDD_BITS
LDD bits |
static java.lang.String |
LDD_CLEAR_BITS
Clear bits command |
static java.lang.String |
LDD_DEVICE_NAME
Name of device file |
static int |
LDD_DIRECTION_INPUT
Mnemonic for input |
static int |
LDD_DIRECTION_OUTPUT
Mnemonic for output |
static int |
LDD_GREEN_LED
Green LED bit |
static int |
LDD_READMODE_DIRECTION
Mnemonic read mode direction |
static int |
LDD_READMODE_LEVELS
Mnemonic read mode levels |
static int |
LDD_READMODE_READMODE
Mnemonic read mode readmode |
static int |
LDD_READMODE_STENCIL
Mnemonic read mode stencil |
static int |
LDD_RED_LED
Red LED bit |
static int |
LDD_RF1_POWER
Radio 1 power bit |
static int |
LDD_RF2_POWER
Radio 2 power bit |
static int |
LDD_RS485_DRV
RS485 Tx bit |
static int |
LDD_RS485_RCV
RS485 Rx bit |
static java.lang.String |
LDD_SET_BITS
Set bits command |
static java.lang.String |
LDD_SET_INPUT
Set direction to input command |
static java.lang.String |
LDD_SET_OUTPUT
Set direction to output command |
static java.lang.String |
LDD_SET_READMODE_DIRECTION
Read direction command |
static java.lang.String |
LDD_SET_READMODE_LEVELS
Read levels command |
static java.lang.String |
LDD_SET_READMODE_READMODE
Read readmode command |
static java.lang.String |
LDD_SET_READMODE_STENCIL
Read stencil command |
static int |
LDD_STENCIL
Mask of lower 3 bits (LEDs) and upper 4 bits (used by Sidearm for other nefarious purposes) |
static int |
LDD_UNUSED
Unused bits |
static java.lang.String |
LDD_WRITE_DIRECTION
Set direction register |
static java.lang.String |
LDD_WRITE_LEVELS
Write mask command |
static int |
LDD_YELLOW_LED
Yellow LED bit |
| Constructor Summary | |
|---|---|
LddMaster()
|
|
| Method Summary | |
|---|---|
int |
applyStencil(int mask)
Apply stencil to bits (protects bits that should not be touched) |
void |
clearBits(int mask)
Clear bits set in mask to the lddio pins |
int |
getDirection()
Get LDD direction bits |
static LddMaster |
getInstance()
Get an LddMaster instance |
int |
getLevels()
Get LDD direction bits |
int |
getReadMode()
Get current read mode |
static void |
main(java.lang.String[] args)
|
int |
readLdd()
Read Ldd in current readMode |
int |
readStenciledLdd()
Read bits and apply specified mask |
void |
setBits(int mask)
Write bits set in mask to the lddio pins |
void |
setDirection(int mask,
int direction)
Set direction for bits in mask |
void |
setReadMode(int readMode)
Set to read either the LDD port or the current stencil |
int |
test()
Eine Kleine test code |
void |
writeDirection(int mask)
Write entire PPDR register |
void |
writeLdd(java.lang.String data)
Write Ldd |
void |
writeLevels(int mask)
Write mask to the PPSR register |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LDD_DEVICE_NAME
public static final java.lang.String LDD_SET_BITS
public static final java.lang.String LDD_CLEAR_BITS
public static final java.lang.String LDD_WRITE_LEVELS
public static final java.lang.String LDD_SET_INPUT
public static final java.lang.String LDD_SET_OUTPUT
public static final java.lang.String LDD_WRITE_DIRECTION
public static final java.lang.String LDD_SET_READMODE_LEVELS
public static final java.lang.String LDD_SET_READMODE_STENCIL
public static final java.lang.String LDD_SET_READMODE_DIRECTION
public static final java.lang.String LDD_SET_READMODE_READMODE
public static final int LDD_BITS
public static final int LDD_RED_LED
public static final int LDD_YELLOW_LED
public static final int LDD_GREEN_LED
public static final int LDD_RS485_RCV
public static final int LDD_RS485_DRV
public static final int LDD_RF1_POWER
public static final int LDD_RF2_POWER
public static final int LDD_ATTN_MSP430
public static final int LDD_UNUSED
public static final int LDD_DIRECTION_INPUT
public static final int LDD_DIRECTION_OUTPUT
public static final int LDD_READMODE_LEVELS
public static final int LDD_READMODE_STENCIL
public static final int LDD_READMODE_DIRECTION
public static final int LDD_READMODE_READMODE
public static final int LDD_STENCIL
| Constructor Detail |
|---|
public LddMaster()
| Method Detail |
|---|
public static LddMaster getInstance()
public void writeLdd(java.lang.String data)
public int readLdd()
public int readStenciledLdd()
public int applyStencil(int mask)
public void setDirection(int mask,
int direction)
public int getDirection()
public int getLevels()
public void setReadMode(int readMode)
public int getReadMode()
public void writeLevels(int mask)
public void writeDirection(int mask)
public void setBits(int mask)
public void clearBits(int mask)
public int test()
public static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||