CHDK_DE Vorschauversion  Trunk Rev. 5428
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
boot.c-Dateireferenz
#include "lolevel.h"
#include "platform.h"
#include "core.h"
+ Include-Abhängigkeitsdiagramm für boot.c:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define offsetof(TYPE, MEMBER)   ((int) &((TYPE *)0)->MEMBER)
 

Funktionen

void JogDial_task_my (void)
 
void task_CaptSeq ()
 
void task_InitFileModules ()
 
void task_RotaryEncoder ()
 
void task_MovieRecord ()
 
void task_ExpDrv ()
 
void handle_jogdial ()
 
void spytask (long ua, long ub, long uc, long ud, long ue, long uf)
 
void CreateTask_spytask ()
 
void task_blinker ()
 
void CreateTask_blinker ()
 
void init_required_fw_features (void)
 
void __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 

Variablen

const char *const new_sa = &_end
 
volatile int jogdial_stopped
 

Makro-Dokumentation

#define offsetof (   TYPE,
  MEMBER 
)    ((int) &((TYPE *)0)->MEMBER)

Definiert in Zeile 6 der Datei boot.c.

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

*-------------------------------------------------------------------—

!!

IS_ERROR( hSoundHandle )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

__MovieRecorder_c__100

__MovieRecorder_c__100

ASM1989 -> In sx200:FF857190 //"Mounter.c"

ASM1989 -> In sx200:FF81B284 // DebugAssert

Definiert in Zeile 139 der Datei boot.c.

139  {
140 // *(int*)0xd20b0884 = 0x4d0002;
141  asm volatile ( // 0xfc02000c
142 " ldr.w sp, =0x80010000\n"
143 " bl sub_fc020064\n"
144 " ldr r2, =0xc0242010\n"
145 " ldr r1, [r2]\n"
146 " orr r1, r1, #1\n"
147 " str r1, [r2]\n"
148 " ldr r0, =0xfcc64c5c\n"
149 " ldr r1, =0x010c1000\n"
150 " ldr r3, =0x010df808\n"
151 "loc_fc020024:\n"
152 " cmp r1, r3\n"
153 " itt lo\n"
154 " ldrlo r2, [r0], #4\n"
155 " strlo r2, [r1], #4\n"
156 " blo loc_fc020024\n"
157 // Install CreateTask patch
158 // use half words in case source or destination not word aligned
159  "adr r0, patch_CreateTask\n" // src: Patch data
160  "ldr r1, =hook_CreateTask\n" // dest: Address to patch (hook_ has thumb bit off)
161  "add r2, r0, #8\n" // two words
162 "task_hook_loop:\n"
163  "ldrh r3, [r0],#2\n"
164  "strh r3, [r1],#2\n"
165  "cmp r0,r2\n"
166  "blo task_hook_loop\n"
167 " ldr r0, =0x010c1000\n"
168 " ldr r1, =0x0001e808\n"
169 " bl sub_fc119422\n"
170 " ldr r0, =0xfcc3dc80\n"
171 " ldr r1, =0x00008000\n"
172 " ldr r3, =0x0002efdc\n"
173 "loc_fc020040:\n"
174 " cmp r1, r3\n"
175 " itt lo\n"
176 " ldrlo r2, [r0], #4\n"
177 " strlo r2, [r1], #4\n"
178 " blo loc_fc020040\n"
179 " ldr r3, =0x0002efdc\n"
180 " ldr r1, =0x0035bb28\n"
181 " mov.w r2, #0\n"
182 "loc_fc020056:\n"
183 " cmp r3, r1\n"
184 " it lo\n"
185 " strlo r2, [r3], #4\n"
186 " blo loc_fc020056\n"
187 //" b.w loc_fc05d050\n"
188 " b.w sub_fc05d050_my\n" // continue
189 
190  "patch_CreateTask:\n"
191  "ldr.w pc, [pc,#0]\n" // Do jump to absolute address CreateTask_my
192  ".long CreateTask_my + 1\n" // has to be a thumb address
193 
194 
195 );
196 }
void CreateTask_blinker ( )

Definiert in Zeile 98 der Datei boot.c.

99 {
100  _CreateTask("blinker", 0x19, 0x200, task_blinker, 0);
101 }
void CreateTask_spytask ( )

Definiert in Zeile 35 der Datei boot.c.

36 {
37 // *(int*)0xd20b0994 = 0x4d0002;
38 
39  _CreateTask("SpyTask", 0x19, 0x2000, spytask, 0);
40 }
void handle_jogdial ( )

Definiert in Zeile 115 der Datei kbd.c.

116 {
117  if (jogdial_stopped) {
118  // update positions in RAM
121  return 0; // return 0 to disable fw's dial handler
122  }
123  return 1;
124 }
void init_required_fw_features ( void  )

Definiert in Zeile 111 der Datei boot.c.

111  {
112  extern void _init_focus_eventflag();
113  extern void _init_nd_eventflag();
114 // extern void _init_nd_semaphore();
115  //extern void _init_zoom_semaphore(); // for MoveZoomLensWithPoint
116 
117  _init_focus_eventflag();
118  _init_nd_eventflag();
119  // for MoveIrisWithAv, based on fc3d1a74 (but without registers eventprocs)
120  extern int av_override_semaphore;
121  extern int _CreateBinarySemaphoreStrictly(int x, int y);
122  av_override_semaphore = _CreateBinarySemaphoreStrictly(0,0);
123 // _init_nd_semaphore();
124 }
void JogDial_task_my ( void  )
void spytask ( long  ua,
long  ub,
long  uc,
long  ud,
long  ue,
long  uf 
)

Definiert in Zeile 27 der Datei boot.c.

28 {
29  core_spytask();
30 }
void task_blinker ( )

Definiert in Zeile 43 der Datei boot.c.

44 {
45 #if 0
46  unsigned v=*(volatile unsigned *)(0x9808);
47  unsigned pat=0;
48  if(v & 0x80000){
49  pat |=1;
50  }
51  if(v & 0x100000){
52  pat |=2;
53  }
54  if(v & 0x200000){
55  pat |=4;
56  }
57  if(v & 0x400000){
58  pat |=8;
59  }
60  if(v & 0x800000){
61  pat |=0x10;
62  }
63  while(1) {
64  int i;
65  for(i=0;i<5;i++) {
66  *(volatile int*)0xd20b0994 = 0x4d0002;
67  if((pat >> i) & 1) {
68  msleep(1000);
69  } else {
70  msleep(250);
71  }
72  *(volatile int*)0xd20b0994 = 0x4c0003;
73  msleep(500);
74  }
75  msleep(5000);
76  }
77 #endif
78 #if 0
79  int delay=1000;
80  if(rbval == 0x12345678) {
81  delay=100;
82  }
83  while(1) {
84  *(volatile int*)0xd20b0994 = 0x4d0002;
85  msleep(delay);
86  *(volatile int*)0xd20b0994 = 0x4c0003;
87  msleep(delay);
88  }
89 #endif
90  while(1) {
91  *(volatile int*)0xd20b0994 = 0x4d0002;
92  msleep(250);
93  *(volatile int*)0xd20b0994 = 0x4c0003;
94  msleep(250);
95  }
96 }
void task_CaptSeq ( )
void task_ExpDrv ( )
void task_InitFileModules ( )
void task_MovieRecord ( )
void task_RotaryEncoder ( )

Variablen-Dokumentation

volatile int jogdial_stopped

Definiert in Zeile 81 der Datei kbd.c.

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.