root/platform/ixus80_sd1100/lib.c

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

DEFINITIONS

This source file includes following definitions.
  1. shutdown
  2. debug_led
  3. camera_set_led
  4. get_flash_params_count
  5. vid_get_palette_type
  6. vid_get_palette_size
  7. vid_get_bitmap_active_palette
  8. vid_get_bitmap_active_buffer

   1 #include "platform.h"
   2 #include "leds.h"
   3 
   4 void shutdown()
   5 {
   6     volatile long *p = (void*)0xc02200a0;
   7 
   8     asm(
   9          "MRS     R1, CPSR\n"
  10          "AND     R0, R1, #0x80\n"
  11          "ORR     R1, R1, #0x80\n"
  12          "MSR     CPSR_cf, R1\n"
  13          :::"r1","r0");
  14 
  15     *p = 0x44;
  16 
  17     while(1);
  18 }
  19 
  20 
  21 void debug_led(int state)
  22 {
  23     volatile long *p=(void*)LED_PR;
  24     if (state)
  25         p[0]=0x46;
  26     else
  27         p[0]=0x44;
  28 }
  29 
  30 
  31 void camera_set_led(int led, int state, __attribute__ ((unused))int bright)
  32 {
  33     int leds[] = {0xd0,0x134,0x138,0x134,0x130,0xd4,0x3030,0x3030};  // power=3 | green | yellow | (not used) | orange | blue | af beam | timer
  34     if(led >= 3 && led <= 10 && led != 6)  //  map to valid params;  no extra TIMER LED (is same as AF)
  35     {
  36         volatile long *p=(void*)0xc0220000 + leds[(led-3)%sizeof(leds)];
  37         if (state)
  38             p[0]=0x46;
  39         else
  40             p[0]=0x44;
  41     }
  42 } 
  43 
  44 
  45 int get_flash_params_count(void){
  46  return 0x73;
  47 }
  48 
  49 // PTP display stuff
  50 int vid_get_palette_type() { return 1; }
  51 int vid_get_palette_size() { return 16*4; }
  52 
  53 void *vid_get_bitmap_active_palette() 
  54 {
  55     return (void *)0x3E9B0;        //Found @ 0xff8e7e94 - Two refs to "BmpDDev"
  56 }
  57 
  58 void *vid_get_bitmap_active_buffer() 
  59 {
  60     return (void*)(*(int*)0x7ACC); //Found @ 0xff8e7e94 - Two refs to "BmpDDev"
  61 }

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