##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.11A/W32               20/Jul/2004  18:58:46 #
# Copyright 1999-2004 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  arm                                                  #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  C:\medusa\nohau.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\nohau.c         #
#    List file       =  C:\medusa\Debug\List\nohau.lst                       #
#    Object file     =  C:\medusa\Debug\Obj\nohau.r79                        #
#                                                                            #
#                                                                            #
##############################################################################

C:\medusa\nohau.c
      1          #include "archinc.h"
      2          #include "nohau.h"
      3          
      4          #ifdef CONFIG_BOARD_NOHAU
      5          
      6          #define LED_DELAY_RAM (65535)
      7          #define LED_DELAY_FLASH (16384)
      8          #define LED_DELAY_COUNT (LED_DELAY_FLASH)
      9          #define LED_DELAY_LOOP {for(i=0; i<LED_DELAY_COUNT; i++);}
     10          static volatile int i;
     11          
     12          /* initialize the Nohau board */
     13          int nohauInit(void)
     14          {
     15            int j;
     16            
     17          
     18            // set all LEDS to outputs
     19            IODIR |= 0x0000FF00;
     20            // turn them all on
     21            IOCLR = 0x0000FF00;
     22            // crude delay
     23            LED_DELAY_LOOP
     24            // turn them all off
     25            IOSET = 0x0000FF00;
     26          
     27            for (j=0;j<8;j++) {
     28              nohauLedOn(j);
     29              LED_DELAY_LOOP
     30              nohauLedOff(j);
     31            }
     32          
     33            for (j=7;j>=0;j--) {
     34              nohauLedOn(j);
     35              LED_DELAY_LOOP
     36              nohauLedOff(j);
     37            }
     38          
     39            return 0;
     40          }
     41          
     42          void nohauToggleLed(unsigned char toggleLed)
     43          {
     44            lpc210x_reg gpioToggleBits = (((lpc210x_reg)(0x100 << toggleLed)) & 0xff00);
     45            lpc210x_reg gpioState = IOPIN;
     46          
     47            gpioState ^= gpioToggleBits;
     48          
     49            IOSET = gpioState;
     50            IOCLR = ~gpioState;
     51          }
     52          
     53          /* LEDs seem to be on P0.8 through P0.15 so leave the other gpio unmolested */
     54          void nohauLedOn(unsigned char ledsOn)
     55          {
     56            lpc210x_reg gpioClrBits = (((lpc210x_reg)(0x100 << ledsOn)) & 0xff00);
     57            IOCLR = gpioClrBits;
     58          }
     59          
     60          /* LEDs seem to be on P0.8 through P0.15 so leave the other gpio unmolested */
     61          void nohauLedOff(unsigned char ledsOff)
     62          {
     63            lpc210x_reg gpioSetBits = (((lpc210x_reg)(0x100 << ledsOff)) & 0xff00);
     64            IOSET = gpioSetBits;
     65          }
     66          
     67          #endif /* CONFIG_BOARD_NOHAU */
     68          


   Segment part sizes:

     Function/Label Bytes
     -------------- -----

 
 
 0 bytes of memory

Errors: none
Warnings: none
