root/platform/ixus80_sd1100/leds.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * led adresses and blinker code
   3  *
   4  * this file is part of the chdk project
   5  * (c) 2008 chr
   6  * GPL v3+
   7  *
   8  * creates for each LED 3 functions (e.g. green):
   9  *
  10  * 1. blink_LED_GREEN()
  11  * 2. LED_GREEN_ON()
  12  *    LED_GREEN_OFF()
  13  *
  14  * can also used from asm: BL LED_GREEN_ON
  15  *
  16  * to 1.
  17  * saves and restores registers on stack.
  18  * Be careful when using from Supervisor mode,
  19  * (that means while booting!)
  20  * it may crash while interrupts are active
  21  *
  22  * to 2.
  23  * register r2 and r3 are clobbered !
  24  */
  25 
  26 
  27 // from ff8e8f10
  28 #define LED_PWR    0xc02200d0
  29 #define LED_PR     0xc02200d4
  30 #define LED_ORANGE 0xc0220130
  31 #define LED_GREEN  0xc0220134
  32 #define LED_YELLOW 0xc0220138
  33 #define LED_AF     0xC0223030
  34 
  35 #define DELAY 3000000
  36 
  37 void blink_it(volatile long *p);
  38 
  39 #define blink_(LED) \
  40 void __attribute__((noinline)) blink_##LED(); \
  41 void __attribute__((noinline)) LED##_ON(); \
  42 void __attribute__((noinline)) LED##_OFF();
  43 
  44 
  45 //#undef blink_(led)
  46 //#define blink_(LED) blink_##LED() = 0;
  47 blink_(LED_PWR)
  48 blink_(LED_GREEN)
  49 blink_(LED_YELLOW)
  50 blink_(LED_ORANGE)
  51 blink_(LED_AF)
  52 blink_(LED_PR)
  53 #undef blink_
  54 

/* [<][>][^][v][top][bottom][index][help] */