Main Page | File List | Globals

icp.h File Reference


Detailed Description

Atmel Corporation

Originally authored by Bruce McKenny

Revision
1.5
Date
Wednesday, November 02, 2005 13:20:02 UTC

Definition in file icp.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _AVR135_ICP_H_   1
#define ICP_ANALOG   1
#define ICP_BUFSIZE   1
#define ICP_RX_QSIZE   ICP_BUFSIZE
#define ICP_SCALE   256U

Typedefs

typedef unsigned char icp_sample_t
typedef unsigned int icp_total_t

Functions

void icp_init (void)
icp_sample_t icp_rx (void)


Define Documentation

#define _AVR135_ICP_H_   1
 

Definition at line 24 of file icp.h.

#define ICP_ANALOG   1
 

Definition at line 26 of file icp.h.

#define ICP_BUFSIZE   1
 

Definition at line 28 of file icp.h.

#define ICP_RX_QSIZE   ICP_BUFSIZE
 

Definition at line 30 of file icp.h.

Referenced by icp_rx().

#define ICP_SCALE   256U
 

Definition at line 35 of file icp.h.

Referenced by TIMER1_COMPA().


Typedef Documentation

typedef unsigned char icp_sample_t
 

Definition at line 37 of file icp.h.

typedef unsigned int icp_total_t
 

Definition at line 38 of file icp.h.


Function Documentation

void icp_init void   ) 
 

icp_init()

Set up the ICP timer.

Definition at line 328 of file icp.c.

References ICP_CTL, ICP_CTL_A, ICP_IE, ICP_OC_IE, ICP_OCR, ICP_PRESCALE, and ICP_START_SENSE.

Referenced by main().

icp_sample_t icp_rx void   ) 
 

icp_rx()

Fetch a sample from the queue. For analog mode, this is a moving average of the last QSIZE readings. For digital, it is the oldest reading.

Definition at line 298 of file icp.c.

References ICP_RX_QSIZE, icp_rx_tail, and icp_total.

Referenced by main().


Generated on Wed Nov 2 14:20:47 2005 for AVR135: Using Timer Capture to Measure PWM Duty Cycle by  doxygen 1.4.4