##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.11A/W32               20/Jul/2004  18:58:47 #
# Copyright 1999-2004 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  arm                                                  #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  C:\medusa\medusa.c                                   #
#    Command line    =  -I "C:\Program Files\IAR Systems\Embedded Workbench  #
#                       4.0\ARM\INC\" -lc C:\medusa\Debug\List\ -la          #
#                       C:\medusa\Debug\List\ -o C:\medusa\Debug\Obj\ -s2    #
#                       --no_cse --no_unroll --no_inline --no_code_motion    #
#                       --no_tbaa --no_clustering --no_scheduling --debug    #
#                       --cpu_mode arm --endian little --cpu ARM7TDMI-S      #
#                       --stack_align 4 -e --fpu None                        #
#                       "-D_DLIB_CONFIG_FILE=C:\Program Files\IAR            #
#                       Systems\Embedded Workbench                           #
#                       4.0\ARM\LIB\dl4tpannl8n.h" C:\medusa\medusa.c        #
#    List file       =  C:\medusa\Debug\List\medusa.lst                      #
#    Object file     =  C:\medusa\Debug\Obj\medusa.r79                       #
#                                                                            #
#                                                                            #
##############################################################################

C:\medusa\medusa.c
      1          #include "archinc.h"
      2          #include "medusa.h"
      3          
      4          #ifdef CONFIG_BOARD_MEDUSA
      5          
      6          /* MBARI Medusa board */
      7          
      8          #define ORANGE_LED_MASK 0x00001000
      9          #define GREEN_LED_MASK  0x00002000
     10          
     11          static boolean greenLedState  = false;
     12          static boolean orangeLedState = false;
     13          
     14          int medusaInit(void)
     15          {
     16            PINSEL0 = 0x80005555;
     17            PINSEL1 = 0x55400000;
     18          
     19            IOSET   = 0x00000E00;
     20            IOCLR   = 0x04003000;
     21            IODIR   = 0x04003E00;
     22          
     23            return 0;
     24          }
     25          
     26          #ifdef CONFIG_TOOLCHAIN_IAR
     27          //#pragma inline
     28          void medusaSetGreenLed(boolean onOff)
     29          #else
     30          void INLINE_KEYWORD medusaSetGreenLed(boolean onOff)
     31          #endif
     32          {
     33            if (onOff == false)
     34              IOCLR = GREEN_LED_MASK;
     35            else
     36              IOSET = GREEN_LED_MASK;
     37          
     38            greenLedState = onOff;
     39          }
     40          
     41          #ifdef CONFIG_TOOLCHAIN_IAR
     42          //#pragma inline
     43          void medusaToggleGreenLed(void)
     44          #else
     45          void INLINE_KEYWORD medusaToggleGreenLed(void)
     46          #endif
     47          {
     48              medusaSetGreenLed(greenLedState == true ? false : true);
     49          }
     50          
     51          #ifdef CONFIG_TOOLCHAIN_IAR
     52          //#pragma inline
     53          void medusaSetOrangeLed(boolean onOff)
     54          #else
     55          void INLINE_KEYWORD medusaSetOrangeLed(boolean onOff)
     56          #endif
     57          {
     58            if (onOff == false)
     59              IOCLR = ORANGE_LED_MASK;
     60            else
     61              IOSET = ORANGE_LED_MASK;
     62          
     63            orangeLedState = onOff;
     64          }
     65          
     66          #ifdef CONFIG_TOOLCHAIN_IAR
     67          //#pragma inline
     68          void medusaToggleOrangeLed(void)
     69          #else
     70          void INLINE_KEYWORD medusaToggleOrangeLed(void)
     71          #endif
     72          {
     73              medusaSetOrangeLed(orangeLedState == true ? false : true);
     74          }
     75          
     76          #endif /* CONFIG_BOARD_MEDUSA */

   Maximum stack usage in bytes:

     Function              CSTACK
     --------              ------
     medusaInit                0
     medusaSetGreenLed         0
     medusaSetOrangeLed        0
     medusaToggleGreenLed      4
     medusaToggleOrangeLed     4


   Segment part sizes:

     Function/Label        Bytes
     --------------        -----
     greenLedState            4
     orangeLedState           4
     medusaInit             104
     medusaSetGreenLed       56
     medusaToggleGreenLed    40
     medusaSetOrangeLed      56
     medusaToggleOrangeLed   40
     ??DataTable1             4
     ??DataTable3             4
      Others                 12

 
 304 bytes in segment CODE
   8 bytes in segment DATA_Z
  12 bytes in segment INITTAB
 
 304 bytes of CODE memory (+ 12 bytes shared)
   8 bytes of DATA memory

Errors: none
Warnings: none
