pevc.h File Reference


Detailed Description

PEVC software driver header for AVR32 UC3.

This file defines a useful set of functions for the PEVC on AVR32 devices.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file pevc.h.

#include <avr32/io.h>
#include "compiler.h"
#include "uc3c_pevc_ids.h"

Go to the source code of this file.

Data Structures

struct  pevc_evs_opt_t
 Parameters of a channel Event Shaper (for channels with asynchronous and external inputs). More...

Channels Software Event API

#define PEVC_CHANNEL_SEV_DISABLE(pevc, chan_id)   ((pevc)->CHMX[(chan_id)].smx = DISABLE)
#define PEVC_CHANNEL_SEV_ENABLE(pevc, chan_id)   ((pevc)->CHMX[(chan_id)].smx = ENABLE)
#define PEVC_CHANNELS_TRIGGER_SEV(pevc, chan_mask)
void pevc_channel_sev_disable (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Disable the Software Event as the event source for a channel.
void pevc_channel_sev_enable (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Enable the Software Event as the event source for a channel.
void pevc_channels_trigger_sev (volatile avr32_pevc_t *pevc, unsigned long long int chan_mask)
 Trigger a software event to one or more channels.

Channels Enable/Disable API

#define PEVC_CHANNELS_DISABLE(pevc, chan_mask)
#define PEVC_CHANNELS_ENABLE(pevc, chan_mask)
void pevc_channels_disable (volatile avr32_pevc_t *pevc, unsigned long long int chan_mask)
 Disable one or more channels.
void pevc_channels_enable (volatile avr32_pevc_t *pevc, unsigned long long int chan_mask)
 Enable one or more channels.
Bool pevc_get_channel_status (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Get the status of a channel.

Channels overrun interrupt API

#define PEVC_CHANNELS_DISABLE_OVERRUN_INTERRUPT(pevc, chan_mask)
#define PEVC_CHANNELS_ENABLE_OVERRUN_INTERRUPT(pevc, chan_mask)
void pevc_channel_clear_overrun_interrupt (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Clear the event overrun interrupt for a given channel.
Bool pevc_channel_is_overrun_interrupt_enabled (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Check if the event overrun interrupt for a given channel is enabled.
Bool pevc_channel_is_overrun_interrupt_raised (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Check if the event overrun interrupt was raised for a given channel.
void pevc_channels_disable_overrun_interrupt (volatile avr32_pevc_t *pevc, unsigned long long int chan_mask)
 Disable the event overrun interrupt of one or more channels.
void pevc_channels_enable_overrun_interrupt (volatile avr32_pevc_t *pevc, unsigned long long int chan_mask)
 Enable the event overrun interrupt of one or more channels.

Channels trigger interrupt API

#define PEVC_CHANNELS_DISABLE_TRIGGER_INTERRUPT(pevc, chan_mask)
#define PEVC_CHANNELS_ENABLE_TRIGGER_INTERRUPT(pevc, chan_mask)
void pevc_channel_clear_trigger_interrupt (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Clear the event trigger interrupt for a given channel.
Bool pevc_channel_is_trigger_interrupt_enabled (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Check if the event trigger interrupt for a given channel is enabled.
Bool pevc_channel_is_trigger_interrupt_raised (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Check if the event trigger interrupt was raised for a given channel.
void pevc_channels_disable_trigger_interrupt (volatile avr32_pevc_t *pevc, unsigned long long int chan_mask)
 Disable the event trigger interrupt of one or more channels.
void pevc_channels_enable_trigger_interrupt (volatile avr32_pevc_t *pevc, unsigned long long int chan_mask)
 Enable the event trigger interrupt of one or more channels.

Channels configuration API

#define PEVC_IGFD_SET(pevc, igfd)   (pevc)->igfdr = ((igfd)<<AVR32_PEVC_IGFDR_IGFDR_OFFSET) & AVR32_PEVC_IGFDR_IGFDR_MASK;
Bool pevc_channel_configure (volatile avr32_pevc_t *pevc, unsigned short int chan_id, unsigned short int gen_id, const pevc_evs_opt_t *pevs)
 Configure a channel.
void pevc_igfd_set (volatile avr32_pevc_t *pevc, unsigned char igfd)
 Set a value for the Input Glitch Filter Divider (used by the Event Shaper).

Defines

Channel state (Idle or Busy)
#define PEVC_CHANNEL_BUSY   1
#define PEVC_CHANNEL_IDLE   0
Event Shaper configuration values
#define PEVC_EVS_EVF_OFF   OFF
#define PEVC_EVS_EVF_ON   ON
#define PEVC_EVS_EVR_OFF   OFF
#define PEVC_EVS_EVR_ON   ON
#define PEVC_EVS_IGF_OFF   OFF
#define PEVC_EVS_IGF_ON   ON
Number of Event Generator and number of Event users
#define PEVC_NUMBER_OF_EVENT_GENERATORS   AVR32_PEVC_EVIN_BITS
#define PEVC_NUMBER_OF_EVENT_USERS   AVR32_PEVC_TRIGOUT_BITS
 Number of event users.

Functions

Channels state (Idle/Busy) API
Bool pevc_get_channel_state (volatile avr32_pevc_t *pevc, unsigned short int chan_id)
 Get the state of a channel (idle or busy).


Define Documentation

#define PEVC_CHANNEL_BUSY   1

Definition at line 71 of file pevc.h.

#define PEVC_CHANNEL_IDLE   0

Definition at line 70 of file pevc.h.

#define PEVC_CHANNEL_SEV_DISABLE ( pevc,
chan_id   )     ((pevc)->CHMX[(chan_id)].smx = DISABLE)

Definition at line 250 of file pevc.h.

#define PEVC_CHANNEL_SEV_ENABLE ( pevc,
chan_id   )     ((pevc)->CHMX[(chan_id)].smx = ENABLE)

Definition at line 225 of file pevc.h.

#define PEVC_CHANNELS_DISABLE ( pevc,
chan_mask   ) 

Value:

if((chan_mask)<=0x80000000)  (pevc)->chdr0 = (chan_mask); \
  else  (pevc)->chdr1 = (chan_mask);

Definition at line 174 of file pevc.h.

Referenced by pevc_channels_disable().

#define PEVC_CHANNELS_DISABLE_OVERRUN_INTERRUPT ( pevc,
chan_mask   ) 

Value:

if((chan_mask)<=0x80000000)  (pevc)->ovidr0 = (chan_mask); \
  else  (pevc)->ovidr1 = (chan_mask);

Definition at line 353 of file pevc.h.

Referenced by pevc_channels_disable_overrun_interrupt().

#define PEVC_CHANNELS_DISABLE_TRIGGER_INTERRUPT ( pevc,
chan_mask   ) 

Value:

if((chan_mask)<=0x80000000)  (pevc)->tridr0 = (chan_mask); \
  else  (pevc)->tridr1 = (chan_mask);

Definition at line 286 of file pevc.h.

Referenced by pevc_channels_disable_trigger_interrupt().

#define PEVC_CHANNELS_ENABLE ( pevc,
chan_mask   ) 

Value:

if((chan_mask)<=0x80000000)  (pevc)->cher0 = (chan_mask); \
  else  (pevc)->cher1 = (chan_mask);

Definition at line 162 of file pevc.h.

Referenced by init_pevc(), and pevc_channels_enable().

#define PEVC_CHANNELS_ENABLE_OVERRUN_INTERRUPT ( pevc,
chan_mask   ) 

Value:

if((chan_mask)<=0x80000000)  (pevc)->ovier0 = (chan_mask); \
  else  (pevc)->ovier1 = (chan_mask);

Definition at line 340 of file pevc.h.

Referenced by pevc_channels_enable_overrun_interrupt().

#define PEVC_CHANNELS_ENABLE_TRIGGER_INTERRUPT ( pevc,
chan_mask   ) 

Value:

if((chan_mask)<=0x80000000)  (pevc)->trier0 = (chan_mask); \
  else  (pevc)->trier1 = (chan_mask);

Definition at line 273 of file pevc.h.

Referenced by pevc_channels_enable_trigger_interrupt().

#define PEVC_CHANNELS_TRIGGER_SEV ( pevc,
chan_mask   ) 

Value:

if((chan_mask)<=0x80000000)  (pevc)->sev0 = (chan_mask); \
  else  (pevc)->sev1 = (chan_mask);

Definition at line 237 of file pevc.h.

Referenced by pevc_channels_trigger_sev().

#define PEVC_EVS_EVF_OFF   OFF

Definition at line 81 of file pevc.h.

Referenced by init_pevc().

#define PEVC_EVS_EVF_ON   ON

Definition at line 80 of file pevc.h.

Referenced by init_pevc().

#define PEVC_EVS_EVR_OFF   OFF

Definition at line 83 of file pevc.h.

#define PEVC_EVS_EVR_ON   ON

Definition at line 82 of file pevc.h.

Referenced by init_pevc().

#define PEVC_EVS_IGF_OFF   OFF

Definition at line 79 of file pevc.h.

Referenced by init_pevc().

#define PEVC_EVS_IGF_ON   ON

Definition at line 78 of file pevc.h.

#define PEVC_IGFD_SET ( pevc,
igfd   )     (pevc)->igfdr = ((igfd)<<AVR32_PEVC_IGFDR_IGFDR_OFFSET) & AVR32_PEVC_IGFDR_IGFDR_MASK;

Definition at line 142 of file pevc.h.

Referenced by pevc_igfd_set().

#define PEVC_NUMBER_OF_EVENT_GENERATORS   AVR32_PEVC_EVIN_BITS

Number of event generators

Definition at line 60 of file pevc.h.

Referenced by pevc_channel_configure().

#define PEVC_NUMBER_OF_EVENT_USERS   AVR32_PEVC_TRIGOUT_BITS


Function Documentation

void pevc_channel_clear_overrun_interrupt ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Clear the event overrun interrupt for a given channel.

Parameters:
*pevc Base address of the PEVC
chan_id channel id

Definition at line 276 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

Referenced by pevc_ovr_int_handler().

00276 {
00277   Assert( NULL != pevc );
00278   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00279   if(chan_id<32)
00280     pevc->ovscr0 = (1 << chan_id);
00281   else
00282     pevc->ovscr1 = (1 << (chan_id-32));
00283 }
00284 }

void pevc_channel_clear_trigger_interrupt ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Clear the event trigger interrupt for a given channel.

Parameters:
*pevc Base address of the PEVC
chan_id channel id

Definition at line 222 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

Referenced by pevc_trg_int_handler().

00222 {
00223   Assert( NULL != pevc );
00224   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00225   if(chan_id<32)
00226     pevc->trscr0 = (1 << chan_id);
00227   else
00228     pevc->trscr1 = (1 << (chan_id-32));
00229 }
00230 

Bool pevc_channel_configure ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id,
unsigned short int  gen_id,
const pevc_evs_opt_t pevs 
)

Configure a channel.

Parameters:
*pevc Base address of the PEVC
chan_id channel to configure
gen_id Event generator to connect to the channel
*pevs Parameters for the channel Event Shaper (valid only for channels with asynchronous and external inputs).
Note:
pevs should be NULL if the event generator is not an asynchronous or external event.
Returns:
Bool PASS if the channel was successfully configured FAIL if the channel configuration failed due to incorrect parameters

Definition at line 60 of file pevc.c.

References pevc_evs_opt_t::evf, pevc_evs_opt_t::evr, pevc_evs_opt_t::igf, pevc_evs_opt_t::igfdr, PEVC_NUMBER_OF_EVENT_GENERATORS, and PEVC_NUMBER_OF_EVENT_USERS.

Referenced by init_pevc().

00064 {
00065   if( NULL != pevc )
00066   {
00067     if(( gen_id < PEVC_NUMBER_OF_EVENT_GENERATORS )
00068     && ( chan_id < PEVC_NUMBER_OF_EVENT_USERS ))
00069     {
00070       // Connect the generator gen_id to the channel.
00071       pevc->CHMX[chan_id].evmx = gen_id;
00072 
00073       // Configure the event shaper for the channel.
00074       if( NULL != pevs )
00075       {
00076         pevc->igfdr = pevs->igfdr;  // Only one divider for all EVS channels.
00077         pevc->EVS[gen_id].igf = pevs->igf;
00078         pevc->EVS[gen_id].evf = pevs->evf;
00079         pevc->EVS[gen_id].evr = pevs->evr;
00080       }
00081       return( PASS );
00082     }
00083     else return( FAIL );
00084   }
00085   else
00086     return( FAIL );
00087 }

Bool pevc_channel_is_overrun_interrupt_enabled ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Check if the event overrun interrupt for a given channel is enabled.

Parameters:
*pevc Base address of the PEVC
chan_id channel id
Returns:
Bool TRUE if the channel trigger interrupt is enabled FALSE if the channel trigger interrupt is disabled

Definition at line 254 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

00254 {
00255   Assert( NULL != pevc );
00256   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00257   if(chan_id<32)
00258     return( ((pevc->ovimr0) & (1 << chan_id))>>chan_id );
00259   else
00260     return( ((pevc->ovimr1) & (1 << (chan_id-32)))>>(chan_id-32) );
00261 }
00262 

Bool pevc_channel_is_overrun_interrupt_raised ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Check if the event overrun interrupt was raised for a given channel.

Parameters:
*pevc Base address of the PEVC
chan_id channel id
Returns:
Bool TRUE if the channel trigger interrupt was raised FALSE otherwise

Definition at line 265 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

Referenced by pevc_ovr_int_handler().

00265 {
00266   Assert( NULL != pevc );
00267   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00268   if(chan_id<32)
00269     return( ((pevc->ovsr0) & (1 << chan_id))>>chan_id );
00270   else
00271     return( ((pevc->ovsr1) & (1 << (chan_id-32)))>>(chan_id-32) );
00272 }
00273 

Bool pevc_channel_is_trigger_interrupt_enabled ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Check if the event trigger interrupt for a given channel is enabled.

Parameters:
*pevc Base address of the PEVC
chan_id channel id
Returns:
Bool TRUE if the channel trigger interrupt is enabled FALSE if the channel trigger interrupt is disabled

Definition at line 199 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

00200 {
00201   Assert( NULL != pevc );
00202   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00203   if(chan_id<32)
00204     return( ((pevc->trimr0) & (1 << chan_id))>>chan_id );
00205   else
00206     return( ((pevc->trimr1) & (1 << (chan_id-32)))>>(chan_id-32) );
00207 }

Bool pevc_channel_is_trigger_interrupt_raised ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Check if the event trigger interrupt was raised for a given channel.

Parameters:
*pevc Base address of the PEVC
chan_id channel id
Returns:
Bool TRUE if the channel trigger interrupt was raised FALSE otherwise

Definition at line 211 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

Referenced by pevc_trg_int_handler().

00211 {
00212   Assert( NULL != pevc );
00213   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00214   if(chan_id<32)
00215     return( ((pevc->trsr0) & (1 << chan_id))>>chan_id );
00216   else
00217     return( ((pevc->trsr1) & (1 << (chan_id-32)))>>(chan_id-32) );
00218 }
00219 

void pevc_channel_sev_disable ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Disable the Software Event as the event source for a channel.

Note:
When the sev is disabled, the event generator is the input event for the channel.
Parameters:
*pevc Base address of the PEVC
chan_id channel to configure

Definition at line 170 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

00171 {
00172   Assert( NULL != pevc );
00173   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00174   pevc->CHMX[chan_id].smx = DISABLE;
00175 }

void pevc_channel_sev_enable ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Enable the Software Event as the event source for a channel.

Note:
When the sev is enabled, the event generator is ignored.
Parameters:
*pevc Base address of the PEVC
chan_id channel to configure

Definition at line 155 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

00156 {
00157   Assert( NULL != pevc );
00158   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00159   pevc->CHMX[chan_id].smx = ENABLE;
00160 }

void pevc_channels_disable ( volatile avr32_pevc_t *  pevc,
unsigned long long int  chan_mask 
)

Disable one or more channels.

Parameters:
*pevc Base address of the PEVC
chan_mask bitmask of channel masks to enable (1 bit per channel, up to 64 channels, actual number of channels depending on the part, chan_mask being (1 << chan_id))

Definition at line 112 of file pevc.c.

References PEVC_CHANNELS_DISABLE.

00113 {
00114   Assert( NULL != pevc );
00115   PEVC_CHANNELS_DISABLE(pevc, chan_mask);
00116 }

void pevc_channels_disable_overrun_interrupt ( volatile avr32_pevc_t *  pevc,
unsigned long long int  chan_mask 
)

Disable the event overrun interrupt of one or more channels.

Parameters:
*pevc Base address of the PEVC
chan_mask bitmask of channel masks to enable (1 bit per channel, up to 64 channels, actual number of channels depending on the part, chan_mask being (1 << chan_id))

Definition at line 247 of file pevc.c.

References PEVC_CHANNELS_DISABLE_OVERRUN_INTERRUPT.

00247 {
00248   Assert( NULL != pevc );
00249   PEVC_CHANNELS_DISABLE_OVERRUN_INTERRUPT(pevc, chan_mask);
00250 }
00251 

void pevc_channels_disable_trigger_interrupt ( volatile avr32_pevc_t *  pevc,
unsigned long long int  chan_mask 
)

Disable the event trigger interrupt of one or more channels.

Parameters:
*pevc Base address of the PEVC
chan_mask bitmask of channel masks to enable (1 bit per channel, up to 64 channels, actual number of channels depending on the part, chan_mask being (1 << chan_id))

Definition at line 192 of file pevc.c.

References PEVC_CHANNELS_DISABLE_TRIGGER_INTERRUPT.

00193 {
00194   Assert( NULL != pevc );
00195   PEVC_CHANNELS_DISABLE_TRIGGER_INTERRUPT(pevc, chan_mask);
00196 }

void pevc_channels_enable ( volatile avr32_pevc_t *  pevc,
unsigned long long int  chan_mask 
)

Enable one or more channels.

Parameters:
*pevc Base address of the PEVC
chan_mask bitmask of channel masks to enable (1 bit per channel, up to 64 channels, actual number of channels depending on the part, chan_mask being (1 << chan_id))

Definition at line 105 of file pevc.c.

References PEVC_CHANNELS_ENABLE.

Referenced by init_pevc().

00106 {
00107   Assert( NULL != pevc );
00108   PEVC_CHANNELS_ENABLE(pevc, chan_mask);
00109 }

void pevc_channels_enable_overrun_interrupt ( volatile avr32_pevc_t *  pevc,
unsigned long long int  chan_mask 
)

Enable the event overrun interrupt of one or more channels.

Note:
An overrun interrupt is raised when an event could not be forwarded to a channel user (if the channel state is busy or if the previous event is still being processed).
Parameters:
*pevc Base address of the PEVC
chan_mask bitmask of channel masks to enable (1 bit per channel, up to 64 channels, actual number of channels depending on the part, chan_mask being (1 << chan_id))

Definition at line 240 of file pevc.c.

References PEVC_CHANNELS_ENABLE_OVERRUN_INTERRUPT.

Referenced by init_pevc().

00240 {
00241   Assert( NULL != pevc );
00242   PEVC_CHANNELS_ENABLE_OVERRUN_INTERRUPT(pevc, chan_mask);
00243 }
00244 

void pevc_channels_enable_trigger_interrupt ( volatile avr32_pevc_t *  pevc,
unsigned long long int  chan_mask 
)

Enable the event trigger interrupt of one or more channels.

Note:
A trigger interrupt is raised when an event trigger is forwarded to a channel user (if the channel state is ready).
Parameters:
*pevc Base address of the PEVC
chan_mask bitmask of channel masks to enable (1 bit per channel, up to 64 channels, actual number of channels depending on the part, chan_mask being (1 << chan_id))

Definition at line 185 of file pevc.c.

References PEVC_CHANNELS_ENABLE_TRIGGER_INTERRUPT.

Referenced by init_pevc().

00186 {
00187   Assert( NULL != pevc );
00188   PEVC_CHANNELS_ENABLE_TRIGGER_INTERRUPT(pevc, chan_mask);
00189 }

void pevc_channels_trigger_sev ( volatile avr32_pevc_t *  pevc,
unsigned long long int  chan_mask 
)

Trigger a software event to one or more channels.

Note:
the channel must have previously been enabled.
Parameters:
*pevc Base address of the PEVC
chan_mask bitmask of channel masks to enable (1 bit per channel, up to 64 channels, actual number of channels depending on the part, chan_mask being (1 << chan_id))

Definition at line 163 of file pevc.c.

References PEVC_CHANNELS_TRIGGER_SEV.

00164 {
00165   Assert( NULL != pevc );
00166   PEVC_CHANNELS_TRIGGER_SEV(pevc, chan_mask);
00167 }

Bool pevc_get_channel_state ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Get the state of a channel (idle or busy).

Note:
the channel must have previously been enabled.
Parameters:
*pevc Base address of the PEVC
chan_id channel id
Returns:
Bool PEVC_CHANNEL_BUSY if the channel is busy (i.e. it is not ready to accept an event) PEVC_CHANNEL_IDLE if the channel is idle

Definition at line 137 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

00138 {
00139   Assert( NULL != pevc );
00140   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00141   if(chan_id<32)
00142     return( ((pevc->busy0) & (1 << chan_id))>>chan_id );
00143   else
00144     return( ((pevc->busy1) & (1 << (chan_id-32)))>>(chan_id-32) );
00145 }

Bool pevc_get_channel_status ( volatile avr32_pevc_t *  pevc,
unsigned short int  chan_id 
)

Get the status of a channel.

Parameters:
*pevc Base address of the PEVC
chan_id channel id
Returns:
Bool ENABLED if channel is enabled DISABLED if channel is disabled

Definition at line 119 of file pevc.c.

References PEVC_NUMBER_OF_EVENT_USERS.

00120 {
00121   Assert( NULL != pevc );
00122   Assert( chan_id < PEVC_NUMBER_OF_EVENT_USERS );
00123   if(chan_id<32)
00124     return( ((pevc->chsr0) & (1 << chan_id))>>chan_id );
00125   else
00126     return( ((pevc->chsr1) & (1 << (chan_id-32)))>>(chan_id-32) );
00127 }

void pevc_igfd_set ( volatile avr32_pevc_t *  pevc,
unsigned char  igfd 
)

Set a value for the Input Glitch Filter Divider (used by the Event Shaper).

Parameters:
*pevc Base address of the PEVC
igfd Input Glitch Filter divider [0,15]
Note:
as stated in the datasheet, there is one divider value for all EVS instance.

Definition at line 91 of file pevc.c.

References PEVC_IGFD_SET.

00092 {
00093   Assert( NULL != pevc );
00094   PEVC_IGFD_SET(pevc, igfd);
00095 }


Generated on Fri Feb 19 02:25:32 2010 for AVR32 - PEVC Driver Example 3 by  doxygen 1.5.5