This source file includes following definitions.
- startup
- get_effective_focal_length
- get_focal_length
- get_zoom_x
- get_vbatt_min
- get_vbatt_max
1 #include "lolevel.h"
2 #include "platform.h"
3 #include "core.h"
4 #include "keyboard.h"
5
6
7 extern long link_bss_start;
8 extern long link_bss_end;
9 extern void boot();
10
11 void startup() {
12 long *bss = &link_bss_start;
13
14 if ((long)&link_bss_end > (MEMISOSTART + MEMISOSIZE)) {
15 started();
16 shutdown();
17 }
18
19 while (bss<&link_bss_end)
20 *bss++ = 0;
21 boot();
22 }
23
24 #define NUM_FL 101
25 #define NUM_DATA 2
26
27
28
29
30
31
32
33
34
35
36
37 const int zoom_points = NUM_FL;
38 extern unsigned int _GetLensFocalLengthAll(unsigned int*, unsigned int*, unsigned int*);
39
40 int get_effective_focal_length(__attribute__ ((unused))int zp) {
41 unsigned int focal [3];
42 _GetLensFocalLengthAll(&focal[0], &focal[1], &focal[2]);
43 return ( (unsigned short)(focal[0]) * 1600 ) ;
44 }
45
46 int get_focal_length(__attribute__ ((unused))int zp) {
47 unsigned int focal [3];
48 _GetLensFocalLengthAll(&focal[0], &focal[1], &focal[2]);
49 return ((unsigned short)(focal[0]) * 1000);
50 }
51
52 int get_zoom_x(__attribute__ ((unused))int zp) {
53 unsigned int focal [3];
54 _GetLensFocalLengthAll(&focal[0], &focal[1], &focal[2]);
55 return (unsigned short)(focal[0]) * 10 / (unsigned short)(focal[1]) ;
56 }
57
58 long get_vbatt_min()
59 {
60 return 2*3300;
61 }
62
63
64 long get_vbatt_max()
65 {
66 return 2*4168;
67 }