# menu.h File Reference

## Detailed Description

Headerfile for menu.c.

Contains definitions of each state and declaration of the state menu entry struct.

Application note:
  AVR458: Charging Li-Ion Batteries with BC100
  AVR463: Charging NiMH Batteries with BC100

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

$Name$

Revision
  4254

$RCSfile$

URL
  http://revisor.norway.atmel.com/AppsAVR8/avr458_Charging_Li-Ion_Batteries_with_BC100/trunk/code/IAR/menu.h

Date
  2008-07-25 12:32:45 +0200 (fr, 25 jul 2008)

Definition in file menu.h.

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

Go to the source code of this file.

## Data Structures
struct | MENU_STATE_struct
| Holds an entry in the state menu. More...
## Defines
#define | ST_BATCON (20)
| Identifies battery control state.
#define | ST_CCURRENT (100)
| Identifies constant current charge state.
#define | ST_CVOLTAGE (110)
| Identifies constant voltage charge state.
#define | ST_DISCHARGE (80)
| Identifies discharge state.
#define | ST_ENDCHARGE (70)
| Identifies end of charge.
#define | ST_ERROR (90)
| Identifies error state.
#define | ST_FASTCHARGE (50)
| Identifies fast charge state.
#define | ST_INIT (10)
| Identifies initialization state.
#define | ST_LOWRATECHARGE (60)
| Identifies trickle charge state.
#define | ST_MAXVOLTCURR (120)
| Identifies maximum voltage & current charge state.
#define | ST_PREQUAL (30)
| Identifies prequalification state.
#define | ST_SLEEP (40)
| Identifies sleep state.
## Typedefs
typedef struct MENU_STATE_struct | MENU_STATE_t
| For convenience.
## Variables
__flash const MENU_STATE_t | menu_state []
| The state menu.

## Define Documentation

#define ST_BATCON (20)

Identifies battery control state.

Definition at line 39 of file menu.h.

Referenced by Charge(), Discharge(), Initialize(), and Sleep().

#define ST_CCURRENT (100)

Identifies constant current charge state.

Definition at line 47 of file menu.h.

Referenced by Charge().

#define ST_CVOLTAGE (110)

Identifies constant voltage charge state.

Definition at line 48 of file menu.h.

Referenced by Charge().

#define ST_DISCHARGE (80)

Identifies discharge state.

Definition at line 45 of file menu.h.

#define ST_ENDCHARGE (70)

Identifies end of charge.

Definition at line 44 of file menu.h.

Referenced by Charge().

#define ST_ERROR (90)

Identifies error state.

Definition at line 46 of file menu.h.

Referenced by BatteryControl(), ConstantCurrent(), ConstantVoltage(), HaltNow(), and MaxVoltageAndCurrent().

#define ST_FASTCHARGE (50)

Identifies fast charge state.

Definition at line 42 of file menu.h.

#define ST_INIT (10)

Identifies initialization state.

Definition at line 38 of file menu.h.

Referenced by Charge(), Error(), HaltNow(), and main().

#define ST_LOWRATECHARGE (60)

Identifies trickle charge state.

Definition at line 43 of file menu.h.

#define ST_MAXVOLTCURR (120)

Identifies maximum voltage & current charge state.

Definition at line 49 of file menu.h.

Referenced by Charge().

#define ST_PREQUAL (30)

Identifies prequalification state.

Definition at line 40 of file menu.h.

Referenced by BatteryControl(), and Charge().

#define ST_SLEEP (40)

Identifies sleep state.

Definition at line 41 of file menu.h.

Referenced by BatteryControl(), Charge(), and HaltNow().

## Typedef Documentation

typedef struct MENU_STATE_struct MENU_STATE_t

For convenience.

Definition at line 64 of file menu.h.

## Variable Documentation

__flash const MENU_STATE_t menu_state[]

The state menu.

Contains all the defined states and addresses to their associated functions.

Definition at line 66 of file menu.c.

Referenced by main().