Merge branch 'Branch_S550_Fast_Emmc' of 192.168.6.216:linux-em-group/s530-ntk into S550_Base
This commit is contained in:
commit
f7eea714b9
|
@ -924,7 +924,7 @@
|
||||||
#define HUNTING_MCU_UART ENABLE
|
#define HUNTING_MCU_UART ENABLE
|
||||||
#define HUNTING_IR_LED_940 ENABLE
|
#define HUNTING_IR_LED_940 ENABLE
|
||||||
#define SF_EXIF_MN_BUF_SIZE 256
|
#define SF_EXIF_MN_BUF_SIZE 256
|
||||||
#define SF_BASE_VERSION "7MR5RCwE10C"
|
#define SF_BASE_VERSION "7MR5RCwE10D"
|
||||||
#define HW_S530 DISABLE
|
#define HW_S530 DISABLE
|
||||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||||
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
||||||
|
|
|
@ -196,11 +196,13 @@
|
||||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_OFF
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_OFF
|
||||||
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
||||||
#else
|
#else
|
||||||
|
#if SF_4G_MODE_TEST != ENABLE
|
||||||
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
||||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
||||||
#define DEFAULT_PIR_SWITCH SF_ON
|
#define DEFAULT_PIR_SWITCH SF_ON
|
||||||
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
||||||
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
||||||
|
#endif
|
||||||
#if SF_BATTERY_TEST == ENABLE
|
#if SF_BATTERY_TEST == ENABLE
|
||||||
#define DEFAULT_GPRS_SWITCH SF_OFF
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
#else
|
#else
|
||||||
|
@ -208,6 +210,11 @@
|
||||||
#define DEFAULT_GPRS_SWITCH SF_OFF
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_REAL_TIME
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_REAL_TIME
|
||||||
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
||||||
|
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_VIDEO2//
|
||||||
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
||||||
|
#define DEFAULT_PIR_SWITCH SF_OFF
|
||||||
|
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_0
|
||||||
|
#define DEFAULT_TIMELAPSE_SWITCH SF_ON
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_GPRS_SWITCH SF_ON
|
#define DEFAULT_GPRS_SWITCH SF_ON
|
||||||
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
||||||
|
|
|
@ -945,7 +945,7 @@
|
||||||
#define HUNTING_MCU_UART ENABLE
|
#define HUNTING_MCU_UART ENABLE
|
||||||
#define HUNTING_IR_LED_940 ENABLE
|
#define HUNTING_IR_LED_940 ENABLE
|
||||||
#define SF_EXIF_MN_BUF_SIZE 256
|
#define SF_EXIF_MN_BUF_SIZE 256
|
||||||
#define SF_BASE_VERSION "7MR5RCwE10C"
|
#define SF_BASE_VERSION "7MR5RCwE10D"
|
||||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||||
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
||||||
#define SF_EMMC_DCF_FILE_NAME "SYBX" /* SYBX0001.JPG */
|
#define SF_EMMC_DCF_FILE_NAME "SYBX" /* SYBX0001.JPG */
|
||||||
|
|
|
@ -65,6 +65,8 @@
|
||||||
#include "IOCfg.h"
|
#include "IOCfg.h"
|
||||||
#include <kwrap/cmdsys.h>
|
#include <kwrap/cmdsys.h>
|
||||||
#include "sf_sd_common.h"
|
#include "sf_sd_common.h"
|
||||||
|
#include <plat/sdio.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Flags for control
|
Flags for control
|
||||||
*/
|
*/
|
||||||
|
@ -93,7 +95,11 @@ typedef struct {
|
||||||
static char thumb_current_path_main[256] = {'\0'};
|
static char thumb_current_path_main[256] = {'\0'};
|
||||||
static char thumb_current_path_clone[256] = {'\0'};
|
static char thumb_current_path_clone[256] = {'\0'};
|
||||||
static lfqueue_t write_queue = {0};
|
static lfqueue_t write_queue = {0};
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
static char movie_current_path_main[256] = {'\0'};
|
||||||
|
static char movie_current_path_main2[256] = {'\0'};
|
||||||
|
|
||||||
|
#endif
|
||||||
#define FILE_SN_MAX 99999
|
#define FILE_SN_MAX 99999
|
||||||
#define FILEDB_MAX_NUM 5000
|
#define FILEDB_MAX_NUM 5000
|
||||||
#define MOVIE_THUMB_WIDTH 640
|
#define MOVIE_THUMB_WIDTH 640
|
||||||
|
@ -1074,6 +1080,11 @@ static void MovieFast_FileNamingCB(MOVIE_CFG_REC_ID id, char *pFileName)
|
||||||
sprintf(tmp, "S%c%02ld%04ld.JPG", font, nextFolderID%100, nextFileID);
|
sprintf(tmp, "S%c%02ld%04ld.JPG", font, nextFolderID%100, nextFileID);
|
||||||
if(id == _CFG_REC_ID_1){
|
if(id == _CFG_REC_ID_1){
|
||||||
snprintf(thumb_current_path_main, sizeof(thumb_current_path_main), "%s", tmp);
|
snprintf(thumb_current_path_main, sizeof(thumb_current_path_main), "%s", tmp);
|
||||||
|
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
snprintf(movie_current_path_main2, sizeof(movie_current_path_main2), "%s", pFileName);
|
||||||
|
snprintf(movie_current_path_main, sizeof(movie_current_path_main), "A:\\DCIM\\%03ld%s\\%s%04ld.MP4", nextFolderID, DCF_DIR_NAME, SF_SD_DCF_FILE_NAME, nextFileID);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if(id == _CFG_CLONE_ID_1){
|
else if(id == _CFG_CLONE_ID_1){
|
||||||
snprintf(thumb_current_path_clone, sizeof(thumb_current_path_clone), "%s", tmp);
|
snprintf(thumb_current_path_clone, sizeof(thumb_current_path_clone), "%s", tmp);
|
||||||
|
@ -1290,6 +1301,40 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3
|
||||||
//DCF_AddDBfile(info->path);
|
//DCF_AddDBfile(info->path);
|
||||||
//DBG_DUMP("%s added to DCF\r\n", info->path);
|
//DBG_DUMP("%s added to DCF\r\n", info->path);
|
||||||
//DBG_WRN("MOVIE_USER_CB_EVENT_CLOSE_FILE_COMPLETED FLGMOVIEFAST_SHUTDOWN\n");
|
//DBG_WRN("MOVIE_USER_CB_EVENT_CLOSE_FILE_COMPLETED FLGMOVIEFAST_SHUTDOWN\n");
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
COPYTO_BYNAME_INFO CopyInfo;
|
||||||
|
INT32 rt;
|
||||||
|
char *Buf = NULL;
|
||||||
|
FST_FILE_STATUS FileStat;
|
||||||
|
FST_FILE fs = 0;
|
||||||
|
DBG_DUMP("movie_current_path_main:%s %s\r\n", movie_current_path_main, movie_current_path_main2);
|
||||||
|
fs = FileSys_OpenFile(movie_current_path_main2, FST_OPEN_ALWAYS | FST_OPEN_WRITE);
|
||||||
|
if(fs)
|
||||||
|
{
|
||||||
|
FileSys_StatFile(fs, &FileStat);
|
||||||
|
printf("%s:%d qFileStat:%llu\n", __FUNCTION__, __LINE__, FileStat.uiFileSize);
|
||||||
|
Buf = malloc(FileStat.uiFileSize);
|
||||||
|
FileSys_CloseFile(fs);
|
||||||
|
}
|
||||||
|
if(Buf != NULL)
|
||||||
|
{
|
||||||
|
CopyInfo.pSrcStrg = (FS_HANDLE)sdio2_getStorageObject(STRG_OBJ_FAT1);
|
||||||
|
CopyInfo.pDstStrg = (FS_HANDLE)sdio_getStorageObject(STRG_OBJ_FAT1);
|
||||||
|
CopyInfo.pSrcPath = movie_current_path_main2;
|
||||||
|
CopyInfo.pDstPath = movie_current_path_main;
|
||||||
|
CopyInfo.pBuf = (char *)Buf;
|
||||||
|
CopyInfo.uiBufSize = FileStat.uiFileSize;
|
||||||
|
CopyInfo.bDelete = FALSE;
|
||||||
|
rt = FileSys_CopyToByName(&CopyInfo);
|
||||||
|
if (rt != FST_STA_OK) {
|
||||||
|
DBG_ERR("movie_current_path_main:%s \r\n", movie_current_path_main);
|
||||||
|
}
|
||||||
|
free(Buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
DBG_DUMP("%s added to DCF\r\n", movie_current_path_main);
|
||||||
|
//
|
||||||
|
#endif
|
||||||
vos_flag_set(MOVIEFAST_FLG_ID, FLGMOVIEFAST_SHUTDOWN);
|
vos_flag_set(MOVIEFAST_FLG_ID, FLGMOVIEFAST_SHUTDOWN);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "sf_led.h"
|
#include "sf_led.h"
|
||||||
#include "IOCfg.h"
|
#include "IOCfg.h"
|
||||||
#include "sf_sd_common.h"
|
#include "sf_sd_common.h"
|
||||||
|
#include <plat/sdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1164,6 +1165,23 @@ INT32 PhotoFast_WriteFile(UINT32 Addr, UINT32 Size, UINT32 Fmt, UINT32 uiPathId,
|
||||||
if (rt == FST_STA_OK) {
|
if (rt == FST_STA_OK) {
|
||||||
// DCF_AddDBfile(FilePath);
|
// DCF_AddDBfile(FilePath);
|
||||||
// DBG_DUMP("%s added to DCF\r\n", FilePath);
|
// DBG_DUMP("%s added to DCF\r\n", FilePath);
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
COPYTO_BYNAME_INFO CopyInfo;
|
||||||
|
sprintf(tmp, "A:\\DCIM\\1%s%s\\%s%s.JPG", str1, DCF_DIR_NAME, SF_SD_DCF_FILE_NAME, str2);
|
||||||
|
CopyInfo.pSrcStrg = (FS_HANDLE)sdio2_getStorageObject(STRG_OBJ_FAT1);
|
||||||
|
CopyInfo.pDstStrg = (FS_HANDLE)sdio_getStorageObject(STRG_OBJ_FAT1);
|
||||||
|
CopyInfo.pSrcPath = FilePath;
|
||||||
|
CopyInfo.pDstPath = tmp;
|
||||||
|
CopyInfo.pBuf = (char *)Addr;
|
||||||
|
CopyInfo.uiBufSize = Length;
|
||||||
|
CopyInfo.bDelete = FALSE;
|
||||||
|
rt = FileSys_CopyToByName(&CopyInfo);
|
||||||
|
if (rt != FST_STA_OK) {
|
||||||
|
DBG_ERR("tmp:%s Addr=0x%x,Size=0x%x,Fmt=%d\r\n", tmp, Addr, Size, Fmt);
|
||||||
|
}
|
||||||
|
DBG_DUMP("%s added to DCF\r\n", tmp);
|
||||||
|
//
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
DBG_ERR("Addr=0x%x,Size=0x%x,Fmt=%d\r\n", Addr, Size, Fmt);
|
DBG_ERR("Addr=0x%x,Size=0x%x,Fmt=%d\r\n", Addr, Size, Fmt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,11 +196,13 @@
|
||||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_OFF
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_OFF
|
||||||
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
||||||
#else
|
#else
|
||||||
|
#if SF_4G_MODE_TEST != ENABLE
|
||||||
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
||||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
||||||
#define DEFAULT_PIR_SWITCH SF_ON
|
#define DEFAULT_PIR_SWITCH SF_ON
|
||||||
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
||||||
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
||||||
|
#endif
|
||||||
#if SF_BATTERY_TEST == ENABLE
|
#if SF_BATTERY_TEST == ENABLE
|
||||||
#define DEFAULT_GPRS_SWITCH SF_OFF
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
#else
|
#else
|
||||||
|
@ -208,6 +210,11 @@
|
||||||
#define DEFAULT_GPRS_SWITCH SF_OFF
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_REAL_TIME
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_REAL_TIME
|
||||||
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
||||||
|
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_VIDEO2//
|
||||||
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
||||||
|
#define DEFAULT_PIR_SWITCH SF_OFF
|
||||||
|
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_0
|
||||||
|
#define DEFAULT_TIMELAPSE_SWITCH SF_ON
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_GPRS_SWITCH SF_ON
|
#define DEFAULT_GPRS_SWITCH SF_ON
|
||||||
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
||||||
|
|
|
@ -1793,11 +1793,14 @@ UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val)
|
||||||
|
|
||||||
temp = (puiPara->PirSensitivity);//sf_mcu_analog_pir_sen_convert(SysGetFlag(DigPirSensitivity));
|
temp = (puiPara->PirSensitivity);//sf_mcu_analog_pir_sen_convert(SysGetFlag(DigPirSensitivity));
|
||||||
|
|
||||||
|
|
||||||
if(puiPara->GprsMode)//hybrid mode 4G module keep sleep
|
if(puiPara->GprsMode)//hybrid mode 4G module keep sleep
|
||||||
{
|
{
|
||||||
temp |= 0x40;
|
temp |= 0x40;
|
||||||
}
|
}
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
temp |= 0x80;
|
||||||
|
#else
|
||||||
if((puiPara->GprsSwitch) && (val == 1))
|
if((puiPara->GprsSwitch) && (val == 1))
|
||||||
{
|
{
|
||||||
temp |= 0x80;
|
temp |= 0x80;
|
||||||
|
@ -1806,6 +1809,7 @@ UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val)
|
||||||
{
|
{
|
||||||
//sf_pdp_flg_set(0);
|
//sf_pdp_flg_set(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
mcuData[i++] = temp;
|
mcuData[i++] = temp;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user