root/platform/ixus120_sd940/sub/boot_hdr.c

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

DEFINITIONS

This source file includes following definitions.
  1. taskHook
  2. CreateTask_spytask

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 #include "dryos31.h"
   5 
   6 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
   7 
   8 #define LED_GREEN  0xC0220130
   9 #define LED_ORANGE 0xC0220134
  10 #define LED_AF     0xC0223030
  11 
  12 const char * const new_sa = &_end;
  13 
  14 // Forward declarations
  15 void Battery_door_hack();
  16 
  17 extern void task_CaptSeq();
  18 extern void task_InitFileModules();
  19 extern void task_MovieRecord();
  20 extern void task_ExpDrv();
  21 extern void task_FileWrite();
  22 
  23 void taskHook(context_t **context)
  24 {
  25     task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));
  26 
  27     // Replace firmware task addresses with ours
  28     if(tcb->entry == (void*)task_CaptSeq)           tcb->entry = (void*)capt_seq_task;
  29     if(tcb->entry == (void*)task_InitFileModules)   tcb->entry = (void*)init_file_modules_task;
  30     if(tcb->entry == (void*)task_MovieRecord)       tcb->entry = (void*)movie_record_task;
  31     if(tcb->entry == (void*)task_ExpDrv)            tcb->entry = (void*)exp_drv_task;
  32     if(tcb->entry == (void*)task_FileWrite)         tcb->entry = (void*)filewritetask;
  33 }
  34 
  35 /*----------------------------------------------------------------------
  36     CreateTask_spytask
  37 -----------------------------------------------------------------------*/
  38 void CreateTask_spytask() {
  39     _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
  40 };
  41 
  42 /*-------------------------------------------------------
  43         Memory Map:
  44                 1900            MEMBASEADDR                             start of data   used for initialized vars
  45                 df03                                                            end of data
  46                 df04                                                            start of bss - used for zeroed/uninited vars
  47                 13ca17                                                          end of bss
  48                 13ca18          MEMISOSTART                             start of our data / bss
  49                 174000          MEMISOSTART+MEMIOSIZE   end of our data/bss (approx)
  50                 ???                                                                     end of memory
  51 
  52                 400000                                                          video buffers ??
  53 
  54                 ff810000        ROMBASEADDR                             start of rom
  55                 ffffffff                                                        end of rom
  56 -------------------------------------------------------*/
  57 
  58 
  59 /*----------------------------------------------------------------------
  60     boot()
  61 
  62     Main entry point for the CHDK code
  63 -----------------------------------------------------------------------*/

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