calibration.h File Reference


Detailed Description

Defines and variables for calibration.

Application note:
AVR453: Smart Battery Reference Design
Documentation:
For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html
Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
Original author: Rob G. Fries - Apt Inc.
Revision
URL
Date

Definition in file calibration.h.

Go to the source code of this file.

Defines

#define CAL_CC_BIT_POS   2
#define CAL_CC_FAIL   (CAL_FAIL << CAL_CC_BIT_POS)
#define CAL_CC_MASK   (3 << CAL_CC_BIT_POS)
#define CAL_CC_OK   (CAL_OK << CAL_CC_BIT_POS)
#define CAL_CC_RUN   (RUN_CAL << CAL_CC_BIT_POS)
#define CAL_FAIL   2
#define CAL_OK   3
#define CAL_VREF_BIT_POS   0
#define CAL_VREF_FAIL   (CAL_FAIL << CAL_VREF_BIT_POS)
#define CAL_VREF_MASK   (3 << CAL_VREF_BIT_POS)
#define CAL_VREF_OK   (CAL_OK << CAL_VREF_BIT_POS)
#define CAL_VREF_RUN   (RUN_CAL << CAL_VREF_BIT_POS)
#define NO_CAL   0
#define RUN_CAL   1

Functions

unsigned char CalibrateCCoffset (void)
unsigned char CalibrateVREF (void)

Variables

unsigned int calibration_state
unsigned int calibration_state_req


Define Documentation

#define CAL_CC_BIT_POS   2

Definition at line 107 of file calibration.h.

Referenced by DoCalibrate().

#define CAL_CC_FAIL   (CAL_FAIL << CAL_CC_BIT_POS)

Definition at line 121 of file calibration.h.

Referenced by DoCalibrate().

#define CAL_CC_MASK   (3 << CAL_CC_BIT_POS)

Definition at line 119 of file calibration.h.

Referenced by DoCalibrate(), and ReadFactoryCalibration().

#define CAL_CC_OK   (CAL_OK << CAL_CC_BIT_POS)

Definition at line 122 of file calibration.h.

Referenced by DoCalibrate(), and ReadFactoryCalibration().

#define CAL_CC_RUN   (RUN_CAL << CAL_CC_BIT_POS)

Definition at line 120 of file calibration.h.

Referenced by DoCalibrate().

#define CAL_FAIL   2

Definition at line 111 of file calibration.h.

Referenced by DoCalibrate().

#define CAL_OK   3

Definition at line 112 of file calibration.h.

Referenced by DoCalibrate().

#define CAL_VREF_BIT_POS   0

Definition at line 106 of file calibration.h.

Referenced by DoCalibrate().

#define CAL_VREF_FAIL   (CAL_FAIL << CAL_VREF_BIT_POS)

Definition at line 116 of file calibration.h.

Referenced by DoCalibrate().

#define CAL_VREF_MASK   (3 << CAL_VREF_BIT_POS)

Definition at line 114 of file calibration.h.

Referenced by DoCalibrate(), and ReadFactoryCalibration().

#define CAL_VREF_OK   (CAL_OK << CAL_VREF_BIT_POS)

Definition at line 117 of file calibration.h.

Referenced by DoCalibrate(), and ReadFactoryCalibration().

#define CAL_VREF_RUN   (RUN_CAL << CAL_VREF_BIT_POS)

Definition at line 115 of file calibration.h.

Referenced by DoCalibrate().

#define NO_CAL   0

Definition at line 109 of file calibration.h.

Referenced by DoCalibrate().

#define RUN_CAL   1

Definition at line 110 of file calibration.h.

Referenced by DoCalibrate().


Function Documentation

unsigned char CalibrateCCoffset ( void   ) 

Definition at line 679 of file analog.c.

References CC_delay_acc, CCarray, CCindex, ChangePowerMode(), EESTORAGE_CC_valid, EESTORAGE_CCIoffset, EESTORAGE_CCoffset, and POWERMODE_ACTIVE.

unsigned char CalibrateVREF ( void   ) 

Definition at line 603 of file analog.c.

References BGCCRCal, EESTORAGE_BGCCR, and EESTORAGE_BGCRR.


Variable Documentation

unsigned int calibration_state

Referenced by DoCalibrate(), ReadFactoryCalibration(), and SMBR_Opt4().

unsigned int calibration_state_req

Referenced by DoCalibrate(), and SMBW_Opt4().


Generated on Mon Nov 12 15:59:58 2007 for AVR453 Smart Battery Reference Design by  doxygen 1.5.3