Interface: tos.chips.at91.timer.HplAT91OSTimer

interface HplAT91OSTimer

Adapted for nxtmote.

Author:
Rasmus Pedersen

Commands
command uint32_t getTCCV() Get the current counter register value for the channel.
command uint32_t getTCRC() Get the current match register value for the channel.
command bool getTCSR() Returns the RC compare status of the status register.
command bool open() Opens a timer channel for a given resolution such as TMilli.
command void setICCR() Clear the interrupt.
command void setIDCR() Disable the interrupt.
command void setIECR() Enable the interrupt.
command void setTCCCR(uint32_t val) Channel control register.
command void setTCIDR(uint32_t val) Sets the TC_IDR register.
command void setTCIER(bool flag) Sets the TC_IER bit corresponding to the timer match.
command void setTCRC(uint32_t val) Set/initialize the match register for the channel.

Events
event void fired() Fired.

Commands - Details

getTCCV

command uint32_t getTCCV()

Get the current counter register value for the channel.

getTCRC

command uint32_t getTCRC()

Get the current match register value for the channel. See TC_RC.

getTCSR

command bool getTCSR()

Returns the RC compare status of the status register. See TC_SR.

open

command bool open()

Opens a timer channel for a given resolution such as TMilli. It will configure the timer channel to generate interrupts when the counter register matches the TC_RC register.

setICCR

command void setICCR()

Clear the interrupt.

setIDCR

command void setIDCR()

Disable the interrupt.

setIECR

command void setIECR()

Enable the interrupt.

setTCCCR

command void setTCCCR(uint32_t val)

Channel control register. Clock enable and disable. Also software triger to start timer.

setTCIDR

command void setTCIDR(uint32_t val)

Sets the TC_IDR register. It disables various timer speciffic interrupts.

setTCIER

command void setTCIER(bool flag)

Sets the TC_IER bit corresponding to the timer match.

setTCRC

command void setTCRC(uint32_t val)

Set/initialize the match register for the channel.

Events - Details

fired

event void fired()

Fired. This event must call getTCSR() in this interface. It will clear the status register.