1 ///////////////////////////////////////////////////////////////////////////////
\r
3 // IAR Atmel AVR C/C++ Compiler V4.30F/W32 12/Mar/2008 23:01:39 /
\r
4 // Copyright 1996-2007 IAR Systems. All rights reserved. /
\r
6 // Source file = C:\home\kevin\pub\src\bc100_cal\IAR\menu.c /
\r
7 // Command line = C:\home\kevin\pub\src\bc100_cal\IAR\menu.c /
\r
8 // --cpu=tiny861 -ms -o C:\home\kevin\pub\src\bc100_cal\IA /
\r
9 // R\Debug\Obj\ -lC C:\home\kevin\pub\src\bc100_cal\IAR\De /
\r
10 // bug\List\ -lB C:\home\kevin\pub\src\bc100_cal\IAR\Debug /
\r
11 // \List\ --initializers_in_flash -z2 --no_cse /
\r
12 // --no_inline --no_code_motion --no_cross_call /
\r
13 // --no_clustering --no_tbaa --debug /
\r
14 // -DENABLE_BIT_DEFINITIONS -e --require_prototypes -I /
\r
15 // "C:\Program Files\IAR Systems\Embedded Workbench /
\r
16 // 4.0\avr\INC\" -I "C:\Program Files\IAR /
\r
17 // Systems\Embedded Workbench 4.0\avr\INC\CLIB\" /
\r
18 // --eeprom_size 512 /
\r
19 // List file = C:\home\kevin\pub\src\bc100_cal\IAR\Debug\List\menu.s90 /
\r
22 ///////////////////////////////////////////////////////////////////////////////
\r
26 RSEG CSTACK:DATA:NOROOT(0)
\r
27 RSEG RSTACK:DATA:NOROOT(0)
\r
35 EXTERN BatteryControl
\r
42 // C:\home\kevin\pub\src\bc100_cal\IAR\menu.c
\r
43 // 1 /* This file has been prepared for Doxygen automatic documentation generation.*/
\r
44 // 2 /*! \file *********************************************************************
\r
47 // 5 * State menu definition
\r
49 // 7 * Contains the definition of the state menu.\n
\r
50 // 8 * The state menu contains all states and adresses to associated functions.
\r
52 // 10 * \par Application note:
\r
53 // 11 * AVR458: Charging Li-Ion Batteries with BC100 \n
\r
54 // 12 * AVR463: Charging NiMH Batteries with BC100
\r
56 // 14 * \par Documentation:
\r
57 // 15 * For comprehensive code documentation, supported compilers, compiler
\r
58 // 16 * settings and supported devices see readme.html
\r
61 // 19 * Atmel Corporation: http://www.atmel.com \n
\r
62 // 20 * Support email: avr@atmel.com
\r
66 // 24 * $Revision: 2299 $
\r
68 // 26 * $URL: http://svn.norway.atmel.com/AppsAVR8/avr458_Charging_Li-Ion_Batteries_with_BC100/tag/20070904_release_1.0/code/IAR/menu.c $
\r
69 // 27 * $Date: 2007-08-23 12:55:51 +0200 (to, 23 aug 2007) $\n
\r
70 // 28 ******************************************************************************/
\r
72 // 30 #include <stdlib.h>
\r
74 // 32 #include "statefunc.h"
\r
75 // 33 #include "charge.h"
\r
76 // 34 #include "main.h"
\r
77 // 35 #include "menu.h"
\r
80 // 38 //******************************************************************************
\r
81 // 39 // State menu (relies on the proper battery type to be defined in main.h!)
\r
82 // 40 //******************************************************************************
\r
84 // 42 /*! \brief The state menu
\r
86 // 44 * Contains all the defined states and addresses to their associated functions.
\r
89 RSEG NEAR_F:CODE:NOROOT(0)
\r
90 // 46 __flash const MENU_STATE_t menu_state[] = {
\r
113 ASEGN ABSOLUTE:DATA:NOROOT,01cH
\r
116 ASEGN ABSOLUTE:DATA:NOROOT,01dH
\r
119 ASEGN ABSOLUTE:DATA:NOROOT,01eH
\r
122 ASEGN ABSOLUTE:DATA:NOROOT,01fH
\r
126 // 47 // State State function
\r
127 // 48 { ST_INIT, Initialize},
\r
128 // 49 { ST_BATCON, BatteryControl},
\r
129 // 50 { ST_PREQUAL, Charge},
\r
130 // 51 { ST_SLEEP, Sleep},
\r
131 // 52 { ST_FASTCHARGE, Charge},
\r
132 // 53 { ST_LOWRATECHARGE, Charge},
\r
133 // 54 { ST_ENDCHARGE, Charge},
\r
134 // 55 { ST_DISCHARGE, Discharge},
\r
135 // 56 { ST_ERROR, Error},
\r
138 // 59 #endif // NIMH
\r
141 // 62 /*! \brief The state menu
\r
143 // 64 * Contains all the defined states and addresses to their associated functions.
\r
145 // 66 __flash const MENU_STATE_t menu_state[] = {
\r
146 // 67 // State State function
\r
147 // 68 { ST_INIT, Initialize},
\r
148 // 69 { ST_BATCON, BatteryControl},
\r
149 // 70 { ST_PREQUAL, Charge},
\r
150 // 71 { ST_SLEEP, Sleep},
\r
151 // 72 { ST_CCURRENT, Charge},
\r
152 // 73 { ST_CVOLTAGE, Charge},
\r
153 // 74 { ST_ENDCHARGE, Charge},
\r
154 // 75 { ST_DISCHARGE, Discharge},
\r
155 // 76 { ST_ERROR, Error},
\r
158 // 79 #endif // LIION
\r
160 // 30 bytes in segment NEAR_F
\r
162 // 30 bytes of CODE memory
\r