root/platform/ixus970_sd890/lib.c

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

DEFINITIONS

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

   1 #include "platform.h"
   2 #include "lolevel.h"
   3 #include "leds.h"
   4 
   5 void shutdown()
   6 {
   7         // 0xC0220000+0x1C @ FF829C28
   8         volatile long *p = (void*)0xC022001C;
   9 
  10         asm(
  11                 "MRS     R1, CPSR\n"
  12                 "AND     R0, R1, #0x80\n"
  13                 "ORR     R1, R1, #0x80\n"
  14                 "MSR     CPSR_cf, R1\n"
  15                 :::"r1","r0");
  16 
  17         *p = 0x44;
  18 
  19         while(1);
  20 }
  21 
  22 // 0x73 @ FF95D974
  23 int get_flash_params_count(void) { return 115; }
  24 
  25 void debug_led(int state)
  26 {
  27         *(int*)LED_PR = state ? 0x46 : 0x44;
  28 }
  29 
  30 void camera_set_led(int led, int state, __attribute__ ((unused))int bright)
  31 {
  32         static char led_table[5]={4,5,7,8,9};
  33         _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
  34 }
  35 
  36 void JogDial_CW(void)
  37 {
  38         _PostLogicalEventToUI(0x866, 2);  // RotateJogDialRight
  39 }
  40 
  41 void JogDial_CCW(void)
  42 {
  43         _PostLogicalEventToUI(0x867, 2);  // RotateJogDialLeft
  44 }
  45 
  46 // PTP display stuff
  47 // TODO type may not be correct
  48 int vid_get_palette_type() { return 1; }
  49 int vid_get_palette_size() { return 16*4; }
  50 
  51 void *vid_get_bitmap_active_palette() 
  52 {
  53     return (void *)0x3ef90;        //100b Found @ 0xff8eaa40 - Two refs to "BmpDDev"
  54 }
  55 
  56 void *vid_get_bitmap_active_buffer() 
  57 {
  58     return (void*)(*(int*)0x7EC4); //100b Found @ 0xff8eaa40 - Two refs to "BmpDDev"
  59 }
  60 

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