root/platform/a3100/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 const char * const new_sa = &_end;
   9 
  10 extern void task_CaptSeq();
  11 extern void task_InitFileModules();
  12 extern void task_MovieRecord();
  13 extern void task_ExpDrv();
  14 extern void task_FileWrite();
  15 
  16 void taskHook(context_t **context)
  17 {
  18     task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));
  19 
  20     // Replace firmware task addresses with ours
  21     if(tcb->entry == (void*)task_CaptSeq)           tcb->entry = (void*)capt_seq_task;
  22     if(tcb->entry == (void*)task_InitFileModules)   tcb->entry = (void*)init_file_modules_task;
  23     if(tcb->entry == (void*)task_MovieRecord)       tcb->entry = (void*)movie_record_task;
  24     if(tcb->entry == (void*)task_ExpDrv)            tcb->entry = (void*)exp_drv_task;
  25     if(tcb->entry == (void*)task_FileWrite)         tcb->entry = (void*)filewritetask;
  26 }
  27 
  28 /*----------------------------------------------------------------------
  29     CreateTask_spytask
  30 -----------------------------------------------------------------------*/
  31 void CreateTask_spytask() {
  32     _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
  33 };
  34 
  35 /*----------------------------------------------------------------------
  36     boot()
  37 
  38     Main entry point for the CHDK code
  39 -----------------------------------------------------------------------*/

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