SunSPOT API V5.0


com.sun.spot.peripheral.proxy
Class ProxyAT91_PIO

java.lang.Object
  extended by com.sun.spot.peripheral.AbstractAT91_PIO
      extended by com.sun.spot.peripheral.proxy.ProxyAT91_PIO
All Implemented Interfaces:
IAT91_PIO

public class ProxyAT91_PIO
extends AbstractAT91_PIO

ProxyAT91_PIO: do not use directly.

See Also:
IAT91_PIO

Field Summary
static String AT91_PIO_SERVER
           
 
Fields inherited from class com.sun.spot.peripheral.AbstractAT91_PIO
baseAddress, PIO_CODR, PIO_IFDR, PIO_IFER, PIO_ODR, PIO_OER, PIO_PDSR, PIO_SODR, pioSelector
 
Fields inherited from interface com.sun.spot.peripheral.IAT91_PIO
CLEAR_OUT, INPUT, OUTPUT, PIOA, PIOB, PIOC, PIOD, SENSE_BIT, SET_OUT
 
Constructor Summary
ProxyAT91_PIO(int pioSelector)
          For use by the SPOT library only - to get a handle to an AT91_PIO use Spot.getInstance() and Spot.getAT91_PIO(int).
 
Method Summary
 int available()
          Return the mask of available pins.
protected  void checkOwned(int mask)
           
 void claim(int mask, int drive, boolean claimForPeriphA)
          Lay claim to certain PIO pins.
 void disableIrq(int irq)
          Disable PIO interrupts for the specified pin
 void enableIrq(int mask)
          Enable PIO interrupts for the specified pin
 void release(int mask)
          Release claim to certain PIO pins
 void waitForIrq(int irq)
          Wait for the specified PIO pin to generate an interrupt.
 
Methods inherited from class com.sun.spot.peripheral.AbstractAT91_PIO
claim, disableGlitchFilter, enableGlitchFilter, getBaseAddress, getDriverName, open, read, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AT91_PIO_SERVER

public static final String AT91_PIO_SERVER
See Also:
Constant Field Values
Constructor Detail

ProxyAT91_PIO

public ProxyAT91_PIO(int pioSelector)
For use by the SPOT library only - to get a handle to an AT91_PIO use Spot.getInstance() and Spot.getAT91_PIO(int).

Method Detail

checkOwned

protected void checkOwned(int mask)
Specified by:
checkOwned in class AbstractAT91_PIO

available

public int available()
Description copied from interface: IAT91_PIO
Return the mask of available pins. An available pin can be claimed.

Specified by:
available in interface IAT91_PIO
Specified by:
available in class AbstractAT91_PIO
Returns:
mask

claim

public void claim(int mask,
                  int drive,
                  boolean claimForPeriphA)
Description copied from interface: IAT91_PIO
Lay claim to certain PIO pins.

Specified by:
claim in interface IAT91_PIO
Specified by:
claim in class AbstractAT91_PIO
Parameters:
mask - claimed pins
drive - bits set to 1 for pins to be controlled by PIO
claimForPeriphA - if true assign undriven pins to peripheral A; if false to peripheral B

release

public void release(int mask)
Description copied from interface: IAT91_PIO
Release claim to certain PIO pins

Specified by:
release in interface IAT91_PIO
Specified by:
release in class AbstractAT91_PIO
Parameters:
mask - released pins

disableIrq

public void disableIrq(int irq)
Description copied from interface: IAT91_PIO
Disable PIO interrupts for the specified pin

Specified by:
disableIrq in interface IAT91_PIO
Specified by:
disableIrq in class AbstractAT91_PIO
Parameters:
irq - A mask with a single bit set indicating the interrupt

enableIrq

public void enableIrq(int mask)
Description copied from interface: IAT91_PIO
Enable PIO interrupts for the specified pin

Specified by:
enableIrq in interface IAT91_PIO
Specified by:
enableIrq in class AbstractAT91_PIO
Parameters:
mask - the pio pin mask

waitForIrq

public void waitForIrq(int irq)
                throws InterruptedException
Description copied from interface: IAT91_PIO
Wait for the specified PIO pin to generate an interrupt. On exit, the pin is masked so that it will not generate another interrupt.

Specified by:
waitForIrq in interface IAT91_PIO
Specified by:
waitForIrq in class AbstractAT91_PIO
Parameters:
irq - A mask with a single bit set indicating the interrupt awaited
Throws:
InterruptedException

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.