Sun SPOT API
Green Release  


com.sun.spot.peripheral
Interface IAT91_TC

All Superinterfaces:
IDriver

public interface IAT91_TC
extends IDriver

Interface to an AT91 Timer Counter.

Author:
Syntropy

Method Summary
 void blockSync()
          Perform a block sync command, which causes a reset of all three counters
 void claimTCLK()
          Enable PIO use of shared TCLK line
 void claimTIOA()
          Disable PIO use of shared TIOA line
 void claimTIOB()
          Disable PIO use of shared TIOB line
 void configure(int mask)
          Configure the Timer-Counter
 void configureXC(int xcMask)
          Configure the block mode inputs appropriate to this TC channel
 int counter()
          Read current counter value
 void disable()
          Disable the counter
 void disableIrq(int mask)
          Disable one or more of the interrupt sources associated with this TC channel.
 void enable()
          Enable counter
 void enableAndReset()
          Enable counter and cause software trigger which forces a reset on next clock edge
 void enableIrq(int mask)
          Enable one or more of the interrupt sources associated with this TC channel.
 int regA()
          Read current Reg A value
 int regB()
          Read current Reg B value
 void setRegA(int i)
          Set the value of the A Compare Register
 void setRegC(int i)
          Set the value of the C Compare Register
 int status()
          Read current status
 void unclaimTIOA()
          Enable PIO use of shared TIOA line
 void waitForIrq()
          Suspend this thread until this TC generates an interrupt.
 
Methods inherited from interface com.sun.spot.peripheral.IDriver
name, setUp, tearDown
 

Method Detail

configure

void configure(int mask)
Configure the Timer-Counter

Parameters:
mask - bits to set in TC_CMR

enableAndReset

void enableAndReset()
Enable counter and cause software trigger which forces a reset on next clock edge


enable

void enable()
Enable counter


counter

int counter()
Read current counter value

Returns:
TC_CV

status

int status()
Read current status

Returns:
TC_SR

claimTIOA

void claimTIOA()
Disable PIO use of shared TIOA line


unclaimTIOA

void unclaimTIOA()
Enable PIO use of shared TIOA line


claimTIOB

void claimTIOB()
Disable PIO use of shared TIOB line


claimTCLK

void claimTCLK()
Enable PIO use of shared TCLK line


regA

int regA()
Read current Reg A value

Returns:
TC_RA

regB

int regB()
Read current Reg B value

Returns:
TC_RB

setRegC

void setRegC(int i)
Set the value of the C Compare Register

Parameters:
i - Value to be set

setRegA

void setRegA(int i)
Set the value of the A Compare Register

Parameters:
i - Value to be set

disable

void disable()
Disable the counter


configureXC

void configureXC(int xcMask)
Configure the block mode inputs appropriate to this TC channel

Parameters:
xcMask - Bits to be set in TC_BMR

blockSync

void blockSync()
Perform a block sync command, which causes a reset of all three counters


enableIrq

void enableIrq(int mask)
Enable one or more of the interrupt sources associated with this TC channel.

Parameters:
mask - Bit mask identifying the required interrupt source(s)

waitForIrq

void waitForIrq()
Suspend this thread until this TC generates an interrupt. You must call enableIrq(int) prior to this, and again if you want a subsequent interrupt.


disableIrq

void disableIrq(int mask)
Disable one or more of the interrupt sources associated with this TC channel.

Parameters:
mask - Bit mask identifying the required interrupt source(s)

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.