This source file includes following definitions.
- log_fwt_msg
- log_fwt_start
1 #include "lolevel.h"
2 #include "platform.h"
3
4 #ifdef CAM_HAS_FILEWRITETASK_HOOK
5
6 #define FILEWRITE_DEBUG_LOG 1
7 extern void _LogCameraEvent(int id,const char *fmt,...);
8
9 typedef struct {
10 unsigned int address;
11 unsigned int length;
12 } cam_ptp_data_chunk;
13
14 #define MAX_CHUNKS_FOR_FWT 7
15
16
17
18
19
20
21
22
23
24
25 typedef struct
26 {
27 int unkn1;
28 int file_offset;
29 int maybe_full_size;
30 int unkn2, unkn3;
31 int unkn4;
32 cam_ptp_data_chunk pdc[MAX_CHUNKS_FOR_FWT];
33 int maybe_seek_flag;
34 int unkn5, unkn6;
35 char name[32];
36 } fwt_data_struct;
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 #include "../../../generic/filewrite.c"
54
55 #ifdef FILEWRITE_DEBUG_LOG
56 void log_fwt_msg(fwt_data_struct *fwd)
57 {
58 int m=fwd->unkn1;
59 _LogCameraEvent(0x60,"fw m:%d o:0x%08x fs:0x%08x sf:0x%x",m,fwd->file_offset,fwd->maybe_full_size,fwd->maybe_seek_flag);
60 _LogCameraEvent(0x60,"fw %s",fwd->name);
61 if(m >= 0 && m <=6) {
62 _LogCameraEvent(0x60,"fw chunk adr:0x%08x l:0x%08x",fwd->pdc[m].address,fwd->pdc[m].length);
63 }
64 _LogCameraEvent(0x60,"fw u %08x %08x %08x %08x %08x %08x",fwd->unkn2,fwd->unkn3,fwd->unkn4,fwd->unkn5,fwd->unkn6);
65 }
66
67 void log_fwt_start(void)
68 {
69 _LogCameraEvent(0x60,"fw start");
70 }
71 #endif
72