纯干货:
static int file_id =
0;
static void dump_file(uint8_t* data,
int data_size)
{
char file_str[
200];
uint32_t
id = file_id ;
#ifdef WIN32
sprintf(file_str,
"c:\\tmp\\file_dump\\%u.jpg",
id);
#else
sprintf(file_str,
"/tmp/file_dump/%u.jpg",
id);
#endif
FILE *f = fopen(file_str,
"wb&