Timer Library
The mikroC PRO for AVR includes Timer library for easier handling of the internal Timer module of XMEGA devices.
Library Routines
Timer_Init
Prototype |
unsigned long Timer_Init(char *module, unsigned long time); |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
Number of uS which is set. |
||||||||||||||||||
Description |
Initializes the Timer/Counter (TC) module. Parameters :
|
||||||||||||||||||
Requires |
This routine is avaliable only for XMEGA devices. |
||||||||||||||||||
Example |
unsigned long time; time = Timer_Init(&TCC0, 1000); |
Timer_Interrupt_Enable
Prototype |
void Timer_Interrupt_Enable(char *module); |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description |
Enables TC overflow interrupt. Parameters :
|
||||||||||||||||||
Requires |
This routine is avaliable only for XMEGA devices. |
||||||||||||||||||
Example |
Timer_Interrupt_Enable(&TCC0); |
Timer_Interrupt_Disable
Prototype |
void Timer_Interrupt_Disable(char *module); |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description |
Disables TC overflow interrupt. Parameters :
|
||||||||||||||||||
Requires |
This routine is avaliable only for XMEGA devices. |
||||||||||||||||||
Example |
Timer_Interrupt_Disable(&TCC0); |
Copyright (c) 2002-2017 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
What do you think about this topic ? Send us feedback!