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

gehe zum Quellcode dieser Datei

Funktionen

void boot ()
 
void startup ()
 
int _GetLensCurrentFocalLength (void)
 
int _GetLensWideFocalLength (void)
 
int get_effective_focal_length (__attribute__((unused)) int zp)
 
int get_focal_length (__attribute__((unused)) int zp)
 
int get_zoom_x (__attribute__((unused)) int zp)
 
long get_vbatt_min ()
 
long get_vbatt_max ()
 

Variablen

long link_bss_start
 
long link_bss_end
 
const int zoom_points = 1
 

Dokumentation der Funktionen

int _GetLensCurrentFocalLength ( void  )
int _GetLensWideFocalLength ( void  )
void boot ( )

Definiert in Zeile 43 der Datei boot.c.

43  {
44 
45  long *canon_data_src = (void*)0xFFEDAC70; // value taken at ROM:FFC00188
46  long *canon_data_dst = (void*)0x1900;
47  long canon_data_len = 0xDF84 - 0x1900; // data_end - data_start 0xDF7C taken at ROM:FFC00138
48  long *canon_bss_start = (void*)0xDF84; // just after data
49  long canon_bss_len = 0xD4F38 - 0xDF84; // d4ec8 taken at ROM:FFC00FB4
50 
51  long i;
52 
53  // enable caches and write buffer...
54  // this is a carryover from old dryos ports, may not be useful
55  asm volatile (
56  "MRC p15, 0, R0,c1,c0\n"
57  "ORR R0, R0, #0x1000\n"
58  "ORR R0, R0, #4\n"
59  "ORR R0, R0, #1\n"
60  "MCR p15, 0, R0,c1,c0\n"
61  :::"r0"
62  );
63 
64  for(i=0;i<canon_data_len/4;i++)
65  canon_data_dst[i]=canon_data_src[i];
66 
67  for(i=0;i<canon_bss_len/4;i++)
68  canon_bss_start[i]=0;
69 
70  asm volatile ("B sub_FFC001A4_my\n");
71 };
int get_effective_focal_length ( __attribute__((unused)) int  zp)

Definiert in Zeile 28 der Datei main.c.

28  {
29  return _GetLensCurrentFocalLength() * 1600;
30 }
int get_focal_length ( __attribute__((unused)) int  zp)

Definiert in Zeile 32 der Datei main.c.

32  {
33  return _GetLensCurrentFocalLength() * 1000;
34 }
long get_vbatt_max ( )

Definiert in Zeile 46 der Datei main.c.

47 {
48  return 2*4168; // 4168 original battery just charged ASM1989
49 }
long get_vbatt_min ( )

Definiert in Zeile 40 der Datei main.c.

41 {
42  return 2*3300;
43 }
int get_zoom_x ( __attribute__((unused)) int  zp)

Definiert in Zeile 36 der Datei main.c.

36  {
38 }
void startup ( )

Definiert in Zeile 11 der Datei main.c.

11  {
12  long *bss = &link_bss_start;
13  // sanity check
14  if ((long)&link_bss_end > (MEMISOSTART + MEMISOSIZE)) {
15  started();
16  shutdown();
17  }
18  // initialize .bss senment
19  while (bss<&link_bss_end)
20  *bss++ = 0;
21  boot();
22 }

Variablen-Dokumentation

long link_bss_end
long link_bss_start
const int zoom_points = 1

Definiert in Zeile 24 der Datei main.c.