1 /* This file has been prepared for Doxygen automatic documentation generation.*/
\r
2 /*! \file *********************************************************************
\r
5 * Headerfile for menu.c
\r
7 * Contains definitions of each state and declaration of the state
\r
10 * \par Application note:
\r
11 * AVR458: Charging Li-Ion Batteries with BC100
\r
13 * \par Documentation:
\r
14 * For comprehensive code documentation, supported compilers, compiler
\r
15 * settings and supported devices see readme.html
\r
18 * Atmel Corporation: http://www.atmel.com \n
\r
19 * Support email: avr@atmel.com
\r
25 * $URL: http://svn.norway.atmel.com/AppsAVR8/avr458_Charging_Li-Ion_Batteries_with_BC100/tag/20070904_release_1.0/code/IAR/menu.h $
\r
26 * $Date: 2007-08-10 09:28:35 +0200 (fr, 10 aug 2007) $\n
\r
27 ******************************************************************************/
\r
32 //******************************************************************************
\r
33 // State machine states
\r
34 //******************************************************************************
\r
35 // State machine states -- max size and number of states is 255.
\r
36 // State values must be larger than zero
\r
37 #define ST_INIT (10) //!< Identifies initialization state.
\r
38 #define ST_BATCON (20) //!< Identifies battery control state.
\r
39 #define ST_PREQUAL (30) //!< Identifies prequalification state.
\r
40 #define ST_SLEEP (40) //!< Identifies sleep state.
\r
41 #define ST_FASTCHARGE (50) //!< Identifies fast charge state.
\r
42 #define ST_LOWRATECHARGE (60) //!< Identifies trickle charge state.
\r
43 #define ST_ENDCHARGE (70) //!< Identifies end of charge.
\r
44 #define ST_DISCHARGE (80) //!< Identifies discharge state.
\r
45 #define ST_ERROR (90) //!< Identifies error state.
\r
46 #define ST_CCURRENT (100) //!< Identifies constant current charge state.
\r
47 #define ST_CVOLTAGE (110) //!< Identifies constant voltage charge state.
\r
50 //******************************************************************************
\r
51 // Struct declarations
\r
52 //******************************************************************************
\r
53 /*! \brief Holds an entry in the state menu
\r
55 * Contains the ID number of a state, and a pointer to its associated function
\r
57 struct MENU_STATE_struct
\r
59 unsigned char state; //!< ID number of state.
\r
60 unsigned char (*pFunc)(unsigned char inp); //!< Associated function.
\r
62 typedef struct MENU_STATE_struct MENU_STATE_t; //!< For convenience.
\r
65 //******************************************************************************
\r
67 //******************************************************************************
\r
68 extern __flash const MENU_STATE_t menu_state[];
\r