This source file includes following definitions.
- taskHook
- 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
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
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
37
38 void CreateTask_spytask() {
39 _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
40 };
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63