root/platform/ixus70_sd1000/lib.c

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

DEFINITIONS

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

   1 #include "platform.h"
   2 
   3 //define LED_AF    0xc02200C0 // found in "taskcreate_LEDCon"
   4 //define LED_BLUE  0xc02200C4
   5 //define LED_RED   0xc02200C8
   6 //define LED_GRN   0xc02200CC
   7 //define LED_YLW   0xc02200D0
   8 //define LED_PWR   0xc02200D4
   9 
  10 void shutdown()
  11 {
  12     volatile long *p = (void*)0xC02200A0;
  13         
  14     asm(
  15          "MRS     R1, CPSR\n"
  16          "AND     R0, R1, #0x80\n"
  17          "ORR     R1, R1, #0x80\n"
  18          "MSR     CPSR_cf, R1\n"
  19          :::"r1","r0");
  20         
  21     *p = 0x44;
  22 
  23     while(1);
  24 }
  25 
  26 
  27 #define LED_PR 0xc02200C4
  28 
  29 void debug_led(int state)
  30 {
  31     volatile long *p=(void*)LED_PR;
  32     if (state)
  33         p[0]=0x46;
  34     else
  35         p[0]=0x44;
  36 }
  37 
  38 
  39 int get_flash_params_count(void){
  40  return 111;
  41 }
  42 
  43 #define LED_BASE 0xC02200C0
  44 
  45 void camera_set_led(int led, int state, __attribute__ ((unused))int bright)
  46 
  47 {
  48   int leds[] = {12,16,4,8,4,0,4};
  49   if(led < 4 || led > 10 || led == 6) return;
  50   volatile long *p=(void*)LED_BASE + leds[led-4];
  51     if (state)
  52         p[0]=0x46;
  53     else
  54         p[0]=0x44;
  55 }
  56 
  57 void *vid_get_bitmap_active_buffer()
  58 {
  59     return (void*)(*(int*)0x8564);  // in sub_ffa25e98 for 100c
  60                                     // in sub_ffa25f0c for 101b/102a
  61 }
  62 
  63 void *vid_get_bitmap_active_palette() {
  64     return (void *)0x561c0;         // in sub_ffa25e98 for 100c
  65                                     // in sub_ffa25f0c for 101b/102a
  66 }
  67 
  68 int vid_get_palette_type() { return 1; }
  69 int vid_get_palette_size() { return 16*4; }

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