root/platform/g10/sub/filewrite_hdr.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. log_fwt_msg

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 
   4 // debug
   5 //#define FILEWRITE_DEBUG_LOG 1
   6 extern void _LogCameraEvent(int id,const char *fmt,...);
   7 
   8 typedef struct {
   9     unsigned int address;
  10     unsigned int length;
  11 } cam_ptp_data_chunk; //camera specific structure
  12 
  13 #define MAX_CHUNKS_FOR_FWT 4 //filewritetask is prepared for this many chunks
  14 /*
  15  * fwt_data_struct: defined here as it's camera dependent
  16  * unneeded members are designated with unkn
  17  * file_offset, full_size, seek_flag only needs to be defined for DryOS>=r50 generation cameras
  18  * pdc is always required
  19  * name is not currently used
  20  */
  21 typedef struct
  22 {
  23     int unkn1[5];                                //
  24     cam_ptp_data_chunk pdc[MAX_CHUNKS_FOR_FWT];
  25     char name[32];
  26 } fwt_data_struct;
  27 
  28 #include "../../../generic/filewrite.c"
  29 
  30 #ifdef FILEWRITE_DEBUG_LOG
  31 void log_fwt_msg(fwt_data_struct *fwd)
  32 {
  33     int m=fwd->unkn1[0];
  34     _LogCameraEvent(0x20,"fw m:%d",m);
  35     _LogCameraEvent(0x20,"fw %s",fwd->name);
  36     if(m >= 4 && m < (4+MAX_CHUNKS_FOR_FWT)) {
  37         _LogCameraEvent(0x20,"fw chunk adr:0x%08x l:0x%08x",fwd->pdc[m-4].address,fwd->pdc[m-4].length);
  38     }
  39     _LogCameraEvent(0x20,"fw u %08x %08x %08x %08x",fwd->unkn1[1],fwd->unkn1[2],fwd->unkn1[3],fwd->unkn1[4]);
  40 }
  41 #endif
  42 

/* [<][>][^][v][top][bottom][index][help] */