root/platform/a470/lib.c

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

DEFINITIONS

This source file includes following definitions.
  1. hook_raw_image_addr
  2. vid_get_viewport_fb
  3. vid_get_viewport_height
  4. vid_get_bitmap_fb
  5. shutdown
  6. debug_led
  7. get_flash_params_count

   1 #include "platform.h"
   2 
   3 char *hook_raw_image_addr()
   4 {
   5     return (char*)0x10F06B20; //found at 0xFFD82C10 (100e)
   6 }
   7 
   8 void *vid_get_viewport_fb()
   9 {
  10          return (void*)0x10659D50; // found at 0xFFE2B904 (100e)
  11 }
  12 
  13 long vid_get_viewport_height()
  14 {
  15     return 240;
  16 }
  17 
  18 void *vid_get_bitmap_fb()  //OSD buffer     
  19 {
  20     return (void*)0x10361000; //found at 0xFFCC2F24 (100e)
  21 }
  22 
  23 void shutdown()
  24 {
  25     volatile long *p = (void*)0xc02200a0;
  26         
  27     asm(
  28          "MRS     R1, CPSR\n"
  29          "AND     R0, R1, #0x80\n"
  30          "ORR     R1, R1, #0x80\n"
  31          "MSR     CPSR_cf, R1\n"
  32          :::"r1","r0");
  33         
  34     *p = 0x44;
  35 
  36     while(1);
  37 }
  38 
  39 // print led (blue)
  40 #define LED_PR 0xc0220084
  41 
  42 void debug_led(int state)
  43 {
  44     volatile long *p=(void*)LED_PR;
  45     if (state)
  46         p[0]=0x46;
  47     else
  48         p[0]=0x44;
  49 }
  50 
  51 #define LED_AF 0xc0220080
  52 
  53 int get_flash_params_count(void){
  54  return 115;
  55 }

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