|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAT91_PIO
Interface to the AT91 Parallel I/O Controller.
| Field Summary | |
|---|---|
static int |
CLEAR_OUT
In calls to write(int, int), causes the selected pins to be set to 0. |
static int |
INPUT
In calls to open(int, int), defines the selected pins to be inputs. |
static int |
OUTPUT
In calls to open(int, int), defines the selected pins to be outputs. |
static int |
PIOA
Symbols identifying the four PIOs |
static int |
PIOB
|
static int |
PIOC
|
static int |
PIOD
|
static int |
SENSE_BIT
A single bit that can be used to test against |
static int |
SET_OUT
In calls to write(int, int), causes the selected pins to be set to 1. |
| Method Summary | |
|---|---|
int |
available()
Return the mask of available pins. |
void |
claim(int mask,
int drive)
Lay claim to certain PIO pins. |
void |
claim(int mask,
int drive,
boolean claimForPeriphA)
Lay claim to certain PIO pins. |
void |
disableGlitchFilter(int mask)
Disable glitch filters for the specified pin(s) |
void |
disableIrq(int irq)
Disable PIO interrupts for the specified pin |
void |
enableGlitchFilter(int mask)
Enable glitch filters for the specified pin(s) |
void |
enableIrq(int mask)
Enable PIO interrupts for the specified pin |
int |
getBaseAddress()
Get the base address of this PIO |
String |
getDriverName()
|
void |
open(int mask,
int config)
Configure the direction of selected pins. |
int |
read()
Read the instantaneous state of the pio pins |
void |
release(int mask)
Release claim to certain PIO pins |
void |
waitForIrq(int irq)
Wait for the specified PIO pin to generate an interrupt. |
void |
write(int mask,
int state)
Set the state of selected output pins |
| Field Detail |
|---|
static final int PIOA
static final int PIOB
static final int PIOC
static final int PIOD
static final int SENSE_BIT
static final int OUTPUT
open(int, int), defines the selected pins to be outputs.
static final int INPUT
open(int, int), defines the selected pins to be inputs.
static final int SET_OUT
write(int, int), causes the selected pins to be set to 1.
static final int CLEAR_OUT
write(int, int), causes the selected pins to be set to 0.
| Method Detail |
|---|
int available()
void claim(int mask,
int drive)
mask - claimed pinsdrive - bits set to 1 for pins to be controlled by PIO. Bits set to 0 default to peripheral A.
void claim(int mask,
int drive,
boolean claimForPeriphA)
mask - claimed pinsdrive - bits set to 1 for pins to be controlled by PIOclaimForPeriphA - if true assign undriven pins to peripheral A; if false to peripheral Bvoid release(int mask)
mask - released pins
void open(int mask,
int config)
mask - The pins to be configuredconfig - Indicates whether these pins are to be input (INPUT) or output (OUTPUT)
void write(int mask,
int state)
mask - The pins to be set or clearedstate - Indicates whether these pins are to be set (SET_OUT) or cleared (CLEAR_OUT)int read()
void enableGlitchFilter(int mask)
mask - the pio pin maskvoid disableGlitchFilter(int mask)
mask - the pio pin maskvoid enableIrq(int mask)
mask - the pio pin mask
void waitForIrq(int irq)
throws InterruptedException
irq - A mask with a single bit set indicating the interrupt awaited
InterruptedExceptionvoid disableIrq(int irq)
irq - A mask with a single bit set indicating the interruptint getBaseAddress()
String getDriverName()
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||