/////////////////////////////////////////////////////////////////////////////// // / // IAR Atmel AVR C/C++ Compiler V4.30F/W32 13/Mar/2008 04:49:38 / // Copyright 1996-2007 IAR Systems. All rights reserved. / // / // Source file = C:\home\kevin\pub\src\bc100\IAR\menu.c / // Command line = C:\home\kevin\pub\src\bc100\IAR\menu.c / // --cpu=tiny861 -ms -o C:\home\kevin\pub\src\bc1 / // 00\IAR\Release\Obj\ -D NDEBUG -lCN / // C:\home\kevin\pub\src\bc100\IAR\Release\List\ / // -lB C:\home\kevin\pub\src\bc100\IAR\Release\Li / // st\ --initializers_in_flash -s9 / // --no_cross_call --no_tbaa / // -DENABLE_BIT_DEFINITIONS -e -I "C:\Program / // Files\IAR Systems\Embedded Workbench / // 4.0\avr\INC\" -I "C:\Program Files\IAR / // Systems\Embedded Workbench 4.0\avr\INC\CLIB\" / // --eeprom_size 512 --misrac=5-9,11-12,14,16-17, / // 19-21,24-26,29-32,34-35,38-39,42-43,46,50, / // 52-54,56-59,61-62,64-65,68-80,83-84,87-91, / // 94-95,98-100,103-110,112-126 / // Enabled MISRA C rules = 5-9,11-12,14,16-17,19-21,24-26,29-32,34-35, / // 38-39,42-43,46,50,52-54,56-59,61-62,64-65, / // 68-80,83-84,87-91,94-95,98-100,103-110,112-126 / // Checked = 5,7-9,11-12,14,17,19-21,24,29-32,34-35,38-39, / // 42,46,50,52-54,56-59,61-62,64,68-69,71-80, / // 83-84,87-89,91,94-95,98,100,104-105,108-109, / // 112-115,118-126 / // Not checked = 6,16,25-26,43,65,70,90,99,103,106-107,110, / // 116-117 / // List file = C:\home\kevin\pub\src\bc100\IAR\Release\List\m / // enu.s90 / // / // / /////////////////////////////////////////////////////////////////////////////// NAME menu RSEG CSTACK:DATA:NOROOT(0) RSEG RSTACK:DATA:NOROOT(0) PUBWEAK __?EEARH PUBWEAK __?EEARL PUBWEAK __?EECR PUBWEAK __?EEDR PUBLIC menu_state EXTERN BatteryControl EXTERN Charge EXTERN Discharge EXTERN Error EXTERN Initialize EXTERN `Sleep` // C:\home\kevin\pub\src\bc100\IAR\menu.c // 1 /* This file has been prepared for Doxygen automatic documentation generation.*/ // 2 /*! \file ********************************************************************* // 3 * // 4 * \brief // 5 * State menu definition // 6 * // 7 * Contains the definition of the state menu.\n // 8 * The state menu contains all states and adresses to associated functions. // 9 * // 10 * \par Application note: // 11 * AVR458: Charging Li-Ion Batteries with BC100 \n // 12 * AVR463: Charging NiMH Batteries with BC100 // 13 * // 14 * \par Documentation: // 15 * For comprehensive code documentation, supported compilers, compiler // 16 * settings and supported devices see readme.html // 17 * // 18 * \author // 19 * Atmel Corporation: http://www.atmel.com \n // 20 * Support email: avr@atmel.com // 21 * // 22 * // 23 * $Name$ // 24 * $Revision: 2299 $ // 25 * $RCSfile$ // 26 * $URL: http://svn.norway.atmel.com/AppsAVR8/avr458_Charging_Li-Ion_Batteries_with_BC100/tag/20070904_release_1.0/code/IAR/menu.c $ // 27 * $Date: 2007-08-23 12:55:51 +0200 (to, 23 aug 2007) $\n // 28 ******************************************************************************/ // 29 // 30 #include // 31 // 32 #include "statefunc.h" // 33 #include "charge.h" // 34 #include "main.h" // 35 #include "menu.h" // 36 // 37 // 38 //****************************************************************************** // 39 // State menu (relies on the proper battery type to be defined in main.h!) // 40 //****************************************************************************** // 41 #ifdef NIMH // 42 /*! \brief The state menu // 43 * // 44 * Contains all the defined states and addresses to their associated functions. // 45 */ RSEG NEAR_F:CODE:NOROOT(0) // 46 __flash const MENU_STATE_t menu_state[] = { menu_state: DB 10 DW Initialize/2 DB 20 DW BatteryControl/2 DB 30 DW Charge/2 DB 40 DW `Sleep`/2 DB 50 DW Charge/2 DB 60 DW Charge/2 DB 70 DW Charge/2 DB 80 DW Discharge/2 DB 90 DW Error/2 DB 0 DW 0H ASEGN ABSOLUTE:DATA:NOROOT,01cH __?EECR: ASEGN ABSOLUTE:DATA:NOROOT,01dH __?EEDR: ASEGN ABSOLUTE:DATA:NOROOT,01eH __?EEARL: ASEGN ABSOLUTE:DATA:NOROOT,01fH __?EEARH: END // 47 // State State function // 48 { ST_INIT, Initialize}, // 49 { ST_BATCON, BatteryControl}, // 50 { ST_PREQUAL, Charge}, // 51 { ST_SLEEP, Sleep}, // 52 { ST_FASTCHARGE, Charge}, // 53 { ST_LOWRATECHARGE, Charge}, // 54 { ST_ENDCHARGE, Charge}, // 55 { ST_DISCHARGE, Discharge}, // 56 { ST_ERROR, Error}, // 57 { 0, NULL}, // 58 }; // 59 #endif // NIMH // 60 // 61 #ifdef LIION // 62 /*! \brief The state menu // 63 * // 64 * Contains all the defined states and addresses to their associated functions. // 65 */ // 66 __flash const MENU_STATE_t menu_state[] = { // 67 // State State function // 68 { ST_INIT, Initialize}, // 69 { ST_BATCON, BatteryControl}, // 70 { ST_PREQUAL, Charge}, // 71 { ST_SLEEP, Sleep}, // 72 { ST_CCURRENT, Charge}, // 73 { ST_CVOLTAGE, Charge}, // 74 { ST_ENDCHARGE, Charge}, // 75 { ST_DISCHARGE, Discharge}, // 76 { ST_ERROR, Error}, // 77 { 0, NULL}, // 78 }; // 79 #endif // LIION // // 30 bytes in segment NEAR_F // // 30 bytes of CODE memory // //Errors: none //Warnings: none