Merge branch 'Branch_S550_Fast_Emmc' of 192.168.6.216:linux-em-group/s530-ntk into Branch_S550_Emmc
This commit is contained in:
commit
c924d94dc7
|
@ -122,6 +122,7 @@ SRC = \
|
|||
./SrcCode/System/SysFW_Upgrade_Strg_Obj.c \
|
||||
./SrcCode/System/SysFW_Upgrade.c \
|
||||
./SrcCode/System/sys_usrmem.c \
|
||||
./SrcCode/System/mem_hotplug.c \
|
||||
./SrcCode/UIApp/UIAppObj.c \
|
||||
./SrcCode/UIApp/ExifVendor.c \
|
||||
./SrcCode/UIApp/Setup/UISetup_Exe.c \
|
||||
|
|
|
@ -922,7 +922,7 @@
|
|||
#define HUNTING_MCU_UART ENABLE
|
||||
#define HUNTING_IR_LED_940 ENABLE
|
||||
#define SF_EXIF_MN_BUF_SIZE 256
|
||||
#define SF_BASE_VERSION "7MR5RCwDC04"
|
||||
#define SF_BASE_VERSION "7MR5RCwDC05"
|
||||
#define HW_S530 DISABLE
|
||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
||||
|
|
|
@ -422,6 +422,7 @@ BOOL System_GetShutdownBegin(void)
|
|||
INT32 System_OnShutdown(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||
{
|
||||
UINT32 displayShow = SHOW_POWER_OFF;
|
||||
BOOL isMenu = sf_is_menu_open();
|
||||
if ( paramNum >= 2)
|
||||
{
|
||||
DBG_DUMP("^MOn Shutdown begin paramNum:%d paramArray[0]:%d paramArray[1]:%d\r\n",paramNum, paramArray[0], paramArray[1]);
|
||||
|
@ -478,13 +479,26 @@ INT32 System_OnShutdown(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
if(sf_get_mode_flag() && SHOW_POWER_OFF == displayShow)
|
||||
#endif
|
||||
{
|
||||
if (FALSE == isMenu)
|
||||
{
|
||||
GxDisplay_Set(LAYER_OSD1, LAYER_STATE_ENABLE, 0); //turn off OSD1
|
||||
GxDisplay_Flush(LAYER_OSD1);
|
||||
|
||||
Display_ShowSplash(SPLASH_POWEROFF);
|
||||
SwTimer_DelayMs(500);
|
||||
}
|
||||
else
|
||||
{
|
||||
Display_ShowSplash(SPLASH_POWEROFF);
|
||||
SwTimer_DelayMs(500);
|
||||
GxDisplay_Set(LAYER_OSD1, LAYER_STATE_ENABLE, 0); //turn off OSD1
|
||||
GxDisplay_Flush(LAYER_OSD1);
|
||||
}
|
||||
// Display_ShowSplash(SPLASH_POWEROFF);
|
||||
// SwTimer_DelayMs(500);
|
||||
// GxDisplay_Set(LAYER_OSD1, LAYER_STATE_ENABLE, 0); //turn off OSD1
|
||||
// GxDisplay_Flush(LAYER_OSD1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "comm/timer.h"
|
||||
#include <io/gpio.h>
|
||||
#include <IOCfg.h>
|
||||
#include "mem_hotplug.h"
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
#include <sf_inc.h>
|
||||
#include "sf_log.h"
|
||||
|
@ -250,6 +251,9 @@ UINT32 nvt_hdal_init(void)
|
|||
DBG_ERR("mem init fail=%d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memory_hotplug();
|
||||
|
||||
ret = hd_gfx_init();
|
||||
if(ret != HD_OK) {
|
||||
DBG_ERR("gfx init fail=%d\n", ret);
|
||||
|
|
82
code/application/source/cardv/SrcCode/System/mem_hotplug.c
Executable file
82
code/application/source/cardv/SrcCode/System/mem_hotplug.c
Executable file
|
@ -0,0 +1,82 @@
|
|||
#include <stdio.h>
|
||||
#include <vendor_common.h>
|
||||
#include "mem_hotplug.h"
|
||||
#include "kwrap/debug.h"
|
||||
|
||||
#define SWAP4(x) ((((x) & 0xFF) << 24) | (((x) & 0xFF00) << 8) | (((x) & 0xFF0000) >> 8) | (((x) & 0xFF000000) >> 24))
|
||||
|
||||
static int read_fdt(const char *path, unsigned int *p_addr, unsigned int *p_size)
|
||||
{
|
||||
int fd;
|
||||
unsigned int reg[2] = {0};
|
||||
|
||||
if ((fd = open(path, O_RDONLY)) < 0) {
|
||||
printf("unable to open %s\n", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (read(fd, reg, sizeof(reg)) != sizeof(reg)) {
|
||||
printf("unable to read reg on %s\n", path);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*p_addr = SWAP4(reg[0]);
|
||||
*p_size = SWAP4(reg[1]);
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_mem_range(unsigned int *p_addr, unsigned int *p_size)
|
||||
{
|
||||
unsigned int fdt_addr, fdt_size;
|
||||
unsigned int rtos_addr, rtos_size;
|
||||
// unsigned int bridge_addr, bridge_size;
|
||||
//get fdt addr and size in nvt_memory_cfg
|
||||
if (read_fdt("/sys/firmware/devicetree/base/nvt_memory_cfg/fdt/reg", &fdt_addr, &fdt_size) != 0) {
|
||||
return -1;
|
||||
}
|
||||
if (read_fdt("/sys/firmware/devicetree/base/nvt_memory_cfg/rtos/reg", &rtos_addr, &rtos_size) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if 0 /* bridge is not used */
|
||||
if (read_fdt("/sys/firmware/devicetree/base/nvt_memory_cfg/bridge/reg", &bridge_addr, &bridge_size) != 0) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
*p_addr = fdt_addr;
|
||||
*p_size = fdt_size + rtos_size;
|
||||
// *p_size = fdt_size + rtos_size + bridge_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int do_hotplug(unsigned int mem_begin, unsigned mem_size)
|
||||
{
|
||||
HD_RESULT ret=0;
|
||||
VENDOR_LINUX_MEM_HOT_PLUG desc = {0};
|
||||
desc.start_addr = mem_begin;
|
||||
desc.size = mem_size;
|
||||
ret = vendor_common_mem_set(VENDOR_COMMON_MEM_ITEM_LINUX_HOT_PLUG, &desc);
|
||||
if(ret != 0){
|
||||
printf("nvtmem_hotplug_set fail ret:%d\n", (int)ret);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
HD_RESULT memory_hotplug(void)
|
||||
{
|
||||
unsigned int mem_begin, mem_size;
|
||||
|
||||
// read memory space from bridge memory
|
||||
if (get_mem_range(&mem_begin, &mem_size) != 0) {
|
||||
return HD_ERR_INIT;
|
||||
}
|
||||
// do hotplug
|
||||
if (do_hotplug(mem_begin, mem_size) != 0) {
|
||||
return HD_ERR_SYS;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
7
code/application/source/cardv/SrcCode/System/mem_hotplug.h
Executable file
7
code/application/source/cardv/SrcCode/System/mem_hotplug.h
Executable file
|
@ -0,0 +1,7 @@
|
|||
#ifndef _MEM_HOTPLUG_H
|
||||
#define _MEM_HOTPLUG_H
|
||||
#include <hd_type.h>
|
||||
|
||||
extern HD_RESULT memory_hotplug(void);
|
||||
|
||||
#endif
|
|
@ -642,6 +642,14 @@ static void update_gps_status(void)
|
|||
sf_show_send_text(UIFlowPhoto, FILE_SENDING_GUI_START_SENDING);
|
||||
return;
|
||||
}
|
||||
if (FTP_CONNECTING_FTP_CONNECTING == sf_cardv_get_ftp_status())
|
||||
{
|
||||
sf_show_send_text(UIFlowPhoto, FTP_CONNECTING_FTP_CONNECTING);
|
||||
return;
|
||||
}
|
||||
else if (FTP_CONNECTING_END != sf_cardv_get_ftp_status()) {
|
||||
sf_show_send_text(UIFlowPhoto, sf_cardv_get_ftp_status());
|
||||
}
|
||||
SF_GPS_STATUS_E status = sf_cardv_get_gps_status();
|
||||
switch (status)
|
||||
{
|
||||
|
@ -1375,6 +1383,8 @@ void UIFlowPhoto_OnBatteryLow(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* ms
|
|||
static void UIFlowPhoto_ScrOpen(lv_obj_t* obj)
|
||||
{
|
||||
|
||||
lv_obj_set_hidden(container_photo_scr_uiflowphoto, false);
|
||||
lv_obj_set_hidden(label_line_scr_uiflowphoto, false);
|
||||
set_indev_keypad_group(obj);
|
||||
update_fd_frame();
|
||||
//#NT#2016/10/04#Lincy Lin -begin
|
||||
|
@ -1390,7 +1400,7 @@ static void UIFlowPhoto_ScrOpen(lv_obj_t* obj)
|
|||
|
||||
/* never closed */
|
||||
gPhotoData.State = PHOTO_ST_WARNING_MENU;
|
||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, 1000);
|
||||
// UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, 1000);
|
||||
// UIFlowMenuCommonConfirmAPI_Open(IDM_FORMAT);
|
||||
// return;
|
||||
#endif
|
||||
|
@ -1481,6 +1491,8 @@ static void UIFlowPhoto_ScrClose(lv_obj_t* obj)
|
|||
/* Reset key press/release/continue mask to default */
|
||||
Ux_FlushEventByRange(NVTEVT_KEY_EVT_START, NVTEVT_KEY_EVT_END);
|
||||
|
||||
lv_obj_set_hidden(container_photo_scr_uiflowphoto, true);
|
||||
lv_obj_set_hidden(label_line_scr_uiflowphoto, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1764,6 +1776,19 @@ static void sf_show_send_text(lv_obj_t* obj, const unsigned short status)
|
|||
SendMsgShow = SENDING_KEEP_SHOW_TIME_S;
|
||||
break;
|
||||
}
|
||||
case FTP_CONNECTING_FTP_CONNECTING:
|
||||
{
|
||||
lv_obj_set_hidden(label_sim_scr_uiflowphoto, false);
|
||||
lv_label_set_text(label_sim_scr_uiflowphoto, "Connecting ... ");
|
||||
SendMsgShow = SENDING_KEEP_SHOW;
|
||||
break;
|
||||
}
|
||||
case FTP_CONNECTING_FTP_CONNECT_SUCCESSFUL:
|
||||
case FTP_CONNECTING_FTP_CONNECT_FAILED:
|
||||
{
|
||||
SendMsgShow = SENDING_NOT_SHOW;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2020,6 +2045,9 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
|||
{
|
||||
case LV_PLUGIN_EVENT_SCR_OPEN:
|
||||
{
|
||||
|
||||
UIFlowPhoto_ScrOpen(obj);//LV_ALIGN_IN_RIGHT_MID
|
||||
|
||||
#define PASSWORD_OPENED 1
|
||||
#define PASSWORD_NOT_OPENED 0
|
||||
static int passwordOpened = PASSWORD_NOT_OPENED;
|
||||
|
@ -2033,7 +2061,7 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
|||
passwordOpened = PASSWORD_OPENED;
|
||||
}
|
||||
|
||||
UIFlowPhoto_ScrOpen(obj);//LV_ALIGN_IN_RIGHT_MID
|
||||
|
||||
|
||||
if(preview_info_task == NULL && g_preview_info_msgbox == NULL && g_preview_info_label == NULL){
|
||||
g_preview_info_msgbox = lv_btn_create(obj, button_msg_bg_scr_uiflowwrnmsg);
|
||||
|
|
|
@ -110,12 +110,17 @@ static void UIFlowPlay_IconImageSize(BOOL bShow)
|
|||
} else {
|
||||
OriImgHeight = (UINT32)hd_vdoframe_info.dim.h;
|
||||
}
|
||||
if (uiFileFmt & (PBFMT_MOVMJPG | PBFMT_AVI | PBFMT_MP4 | PBFMT_TS)) {
|
||||
lv_obj_set_hidden(container_play_scr_uiflowplay, false);
|
||||
} else {
|
||||
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||
}
|
||||
|
||||
//hide icon
|
||||
if (bShow == FALSE) {
|
||||
// UxCtrl_SetShow(&UIFlowWndPlay_StaticTXT_SizeCtrl, FALSE);
|
||||
lv_obj_set_hidden(label_file_size_scr_uiflowplay, true);
|
||||
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||
// lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||
return;
|
||||
}
|
||||
//show icon
|
||||
|
@ -988,6 +993,7 @@ static void UIFlowPlay_ScrOpen(lv_obj_t* obj)
|
|||
update_playicons(g_PlbData.State);
|
||||
// Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PHOTO);
|
||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, 3000);
|
||||
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2017,15 +2023,25 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
|||
break;
|
||||
}
|
||||
case LV_USER_KEY_LEFT:
|
||||
{
|
||||
UINT32 uiFileSeq;
|
||||
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
|
||||
if (0 != uiFileSeq)
|
||||
{
|
||||
stop_play();
|
||||
UIFlowPlay_OnKeyUp(obj);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LV_USER_KEY_RIGHT:
|
||||
{
|
||||
UINT32 uiFileSeq;
|
||||
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
|
||||
if (0 != uiFileSeq)
|
||||
{
|
||||
stop_play();
|
||||
UIFlowPlay_OnKeyDown(obj);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2038,6 +2054,10 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
|||
}
|
||||
case LV_USER_KEY_DOWN:
|
||||
case LV_USER_KEY_NEXT:
|
||||
{
|
||||
UINT32 uiFileSeq;
|
||||
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
|
||||
if (0 != uiFileSeq)
|
||||
{
|
||||
stop_play();
|
||||
UIFlowMenuCommonConfirmAPI_Open(IDM_DELETE_THIS);
|
||||
|
@ -2045,7 +2065,8 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
|||
UIFlowPlay_OnKeyNext(obj);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case LV_USER_KEY_ZOOMIN:
|
||||
{
|
||||
break;
|
||||
|
|
|
@ -357,11 +357,15 @@ void sf_set_module_sleep_flag(UINT8 flag);
|
|||
UINT8 sf_get_module_sleep_flag(void);
|
||||
int sf_app_while_flag(void);
|
||||
void sf_set_sim_insert(INT32 sim);
|
||||
#define GPS_SEARCHING_START 0
|
||||
#define GPS_SEARCHING_STOP 1
|
||||
#define GPS_SEARCHING_SUCCESSFUL 2
|
||||
#define GPS_SEARCHING_FAILED 3
|
||||
#define GPS_SEARCHING_START 0
|
||||
#define GPS_SEARCHING_STOP 1
|
||||
#define GPS_SEARCHING_SUCCESSFUL 2
|
||||
#define GPS_SEARCHING_FAILED 3
|
||||
void sf_set_gps_status(const short status);
|
||||
#define FTP_CONNECTING 4
|
||||
#define FTP_CONNECT_SUCCESSFUL 5
|
||||
#define FTP_CONNECT_FAILED 6
|
||||
void sf_set_ftp_status(const short status);
|
||||
void sf_set_usb_init(int flag);
|
||||
UINT32 sf_get_sim_insert(void);
|
||||
int sf_get_signal_ready(void);
|
||||
|
|
|
@ -488,6 +488,7 @@ typedef enum sf_PARA_MESSAGE_TYPE_E
|
|||
SF_PARA_CMD_ISESIM = 0x1F07,
|
||||
SF_PARA_CMD_USB_INIT = 0x1F08,
|
||||
SF_PARA_CMD_GPS_STATUS = 0X1F09,
|
||||
SF_PARA_CMD_FTP_CONNECT_STATUS= 0X1F0A,
|
||||
}SF_PARA_MESSAGE_TYPE_E;
|
||||
|
||||
typedef enum sf_WIFI_MESSAGE_TYPE_E
|
||||
|
|
|
@ -3992,7 +3992,7 @@ SINT32 sf_net_regist_manual(void)
|
|||
}
|
||||
}
|
||||
|
||||
if((sf_get_mode_flag()) || (PWR_ON_GPRS_INIT == sf_convert_power_on_mode()) || (PWR_ON_DAILY_REPORT == sf_convert_power_on_mode()))
|
||||
if((sf_get_mode_flag()) || (PWR_ON_GPRS_INIT == sf_poweron_type_get()) || (PWR_ON_DAILY_REPORT == sf_poweron_type_get()))
|
||||
{
|
||||
eNetRegLocation = QUECTEL_NETREG_ATW;
|
||||
strcpy((char *)gsmPara, "AT&W\r");
|
||||
|
@ -4142,7 +4142,7 @@ SINT32 sf_auto_net_reg(void)
|
|||
}
|
||||
else if(strstr((const char *)gsmPara, "+QSIMSTAT: 0,1"))
|
||||
{
|
||||
if(PWR_ON_SMS == sf_convert_power_on_mode())
|
||||
if(PWR_ON_SMS == sf_poweron_type_get())
|
||||
{
|
||||
eNetRegLocation = QUECTEL_NETREG_CGREG;
|
||||
strcpy((char *)gsmPara, "AT+CGREG?\r");
|
||||
|
|
|
@ -1422,6 +1422,7 @@ SINT32 sf_4g_module_ota_ftp(void)
|
|||
*************************************************/
|
||||
SINT32 sf_connect_ftps_server(void)
|
||||
{
|
||||
sf_set_ftp_status(FTP_CONNECTING);
|
||||
SINT32 ret = SF_SUCCESS;//0:success; else:fail;
|
||||
UINT8 ssl = 0;
|
||||
UINT8 gprsMode = 0;
|
||||
|
@ -1448,8 +1449,13 @@ SINT32 sf_connect_ftps_server(void)
|
|||
if(FTP_MANAGER_SERVICE_AVAILABLE == result)
|
||||
{
|
||||
FtpOpenOk = SUCCESS;
|
||||
sf_set_ftp_status(FTP_CONNECT_SUCCESSFUL);
|
||||
}
|
||||
//ret = sf_ftp_stop(ssl, gprsMode);
|
||||
else
|
||||
{
|
||||
sf_set_ftp_status(FTP_CONNECT_FAILED);
|
||||
}
|
||||
ret = sf_ftp_stop(ssl, gprsMode);
|
||||
|
||||
//SF_FTP_CONNECT_END:
|
||||
//printf("[%s:%d]ret:[0x%08X]\n\n", __FUNCTION__, __LINE__, ret);
|
||||
|
|
|
@ -964,7 +964,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
|
|||
{
|
||||
sf_set_pir_statu_flag(0);
|
||||
sf_set_module_sleep_flag(0);
|
||||
if((PWR_ON_SETUP != sf_convert_power_on_mode()) && (PWR_ON_USB!= sf_convert_power_on_mode()))
|
||||
if((PWR_ON_SETUP != sf_poweron_type_get()) && (PWR_ON_USB!= sf_poweron_type_get()))
|
||||
{
|
||||
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
|
||||
sf_set_power_off_flag(1);
|
||||
|
|
|
@ -1157,7 +1157,7 @@ UINT8 sf_get_power_on_mode(void)
|
|||
}
|
||||
return ModeFlag;
|
||||
}
|
||||
UINT8 sf_convert_power_on_mode(void)
|
||||
UINT8 sf_convert_power_on_mode(void)//sf_poweron_type_get
|
||||
{
|
||||
//PowerOnMode &= 0x0f;
|
||||
//printf("[%s:%d]PowerOnMode=0x%x\n",__FUNCTION__,__LINE__,PowerOnMode);
|
||||
|
@ -1261,6 +1261,14 @@ void sf_set_gps_status(const short status)
|
|||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
}
|
||||
}
|
||||
void sf_set_ftp_status(const short status)
|
||||
{
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
stMessageBuf.arg2 = status;
|
||||
stMessageBuf.arg1 = SF_PARA_CMD_FTP_CONNECT_STATUS;
|
||||
stMessageBuf.cmdId = CMD_PARA;
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
}
|
||||
void sf_set_usb_init(int flag)
|
||||
{
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
|
|
@ -40,6 +40,12 @@ typedef enum{
|
|||
FILE_SENDING_GUI_SEND_FAILED,
|
||||
FILE_SENDING_GUI_END
|
||||
} FILE_SENDING_GUI_E;
|
||||
typedef enum{
|
||||
FTP_CONNECTING_FTP_CONNECTING = FILE_SENDING_GUI_END,
|
||||
FTP_CONNECTING_FTP_CONNECT_SUCCESSFUL,
|
||||
FTP_CONNECTING_FTP_CONNECT_FAILED,
|
||||
FTP_CONNECTING_END
|
||||
} FTP_CONNECTING_E;
|
||||
#define DEFAULT_GO_TO_WORK_MODE_TIME_S 85
|
||||
#define PASSWORD_SCREEN_GO_TO_WORK_MODE_TIME_S 61
|
||||
#define MENU_SCREEN_GO_TO_WORK_MODE_TIME_S 60
|
||||
|
@ -126,6 +132,8 @@ BOOL sf_is_preview(void);
|
|||
short sf_cardv_get_cq_signal(void);
|
||||
void sf_cardv_set_gps_status(const SF_GPS_STATUS_E status);
|
||||
const SF_GPS_STATUS_E sf_cardv_get_gps_status(void);
|
||||
void sf_cardv_set_ftp_status(const FTP_CONNECTING_E status);
|
||||
const FTP_CONNECTING_E sf_cardv_get_ftp_status(void);
|
||||
void sf_cardv_4G_status_set(UINT8 status);
|
||||
UINT8 sf_cardv_4G_status_get(void);
|
||||
void sf_cardv_set_sim_insert(INT8 sim);
|
||||
|
|
|
@ -100,6 +100,7 @@ static UINT8 UiparaFlag = 0;
|
|||
static SF_BLE_STATUS_E BleStatus = SF_BLE_OK;
|
||||
static UINT8 McuUpdateFlag = 0;
|
||||
static SF_GPS_STATUS_E gGpsSearching = SF_GPS_SEARCHING_UNKNOW;
|
||||
static FTP_CONNECTING_E gFtpConnectingStatus = FTP_CONNECTING_END;
|
||||
static char CamMode = 0;
|
||||
static CHAR netGeneration = SF_NET_NO;
|
||||
static SF_THREAD_S UpgradeTskParam =
|
||||
|
@ -1542,6 +1543,15 @@ const SF_GPS_STATUS_E sf_cardv_get_gps_status(void)
|
|||
{
|
||||
return gGpsSearching;
|
||||
}
|
||||
void sf_cardv_set_ftp_status(const FTP_CONNECTING_E status)
|
||||
{
|
||||
printf("sf_cardv_set_ftp_status = %d\n", status);
|
||||
gFtpConnectingStatus = status;
|
||||
}
|
||||
const FTP_CONNECTING_E sf_cardv_get_ftp_status(void)
|
||||
{
|
||||
return gFtpConnectingStatus;
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
Function: sf_cardv_adc_value_get
|
||||
|
@ -1784,6 +1794,9 @@ static SINT32 sf_cardv_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
break;
|
||||
case SF_PARA_CMD_GPS_STATUS:
|
||||
sf_cardv_set_gps_status(pMessageBuf->arg2);
|
||||
break;
|
||||
case SF_PARA_CMD_FTP_CONNECT_STATUS:
|
||||
sf_cardv_set_ftp_status(pMessageBuf->arg2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2005,7 +2018,6 @@ void sf_cardv_message_thread_init(void)
|
|||
void sf_set_menu_open(BOOL is)
|
||||
{
|
||||
IsMenu = is;
|
||||
//printf("[%s]:%d IsMenu:%d\n", __FUNCTION__, __LINE__, IsMenu);
|
||||
}
|
||||
|
||||
BOOL sf_is_menu_open(void)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
};
|
||||
|
||||
/* Linux system memory region*/
|
||||
memory { device_type = "memory"; reg = <0x00000000 0x01800000 0x02000000 0x01600000>; };
|
||||
memory { device_type = "memory"; reg = <0x00000000 0x01800000 0x02800000 0x00E00000>; };
|
||||
|
||||
/* Linux setup reserved memory */
|
||||
reserved-memory {
|
||||
|
|
|
@ -849,7 +849,7 @@
|
|||
// 2. enable FS_DX_TYPE_DRIVE_B as DX_TYPE_CARD2
|
||||
// 3. enable FS_MULTI_STRG_FUNC
|
||||
// 4. NETWORK = NETWORK_NONE (Both uITRON and eCos)
|
||||
#define FS_MULTI_STRG_FUNC DISABLE
|
||||
#define FS_MULTI_STRG_FUNC ENABLE
|
||||
//MULTI_DRIVE
|
||||
#if defined(_EMBMEM_EMMC_) && (FS_MULTI_STRG_FUNC==DISABLE)
|
||||
#define FS_DX_TYPE_DRIVE_A USER_DX_TYPE_EMBMEM_FAT
|
||||
|
@ -945,7 +945,7 @@
|
|||
#define HUNTING_MCU_UART ENABLE
|
||||
#define HUNTING_IR_LED_940 ENABLE
|
||||
#define SF_EXIF_MN_BUF_SIZE 256
|
||||
#define SF_BASE_VERSION "7MR5RCwDC04"
|
||||
#define SF_BASE_VERSION "7MR5RCwDC05"
|
||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
||||
#define PHOTO_THUMB_PATH "A:\\THUMB\\"
|
||||
|
|
|
@ -299,16 +299,16 @@ void System_OnStrgInit_FS(void)
|
|||
Pool.addr = mempool_filesys;
|
||||
#if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
MEM_RANGE Pool2;
|
||||
Pool.Size = POOL_SIZE_FS_BUFFER;
|
||||
Pool.size = POOL_SIZE_FILESYS;
|
||||
GxStrg_SetConfigEx(0, FILE_CFG_BUF, (UINT32)&Pool);
|
||||
Pool2.Addr = Pool.Addr + POOL_SIZE_FS_BUFFER;
|
||||
Pool2.Size = POOL_SIZE_FS_BUFFER;
|
||||
Pool2.addr = Pool.addr + POOL_SIZE_FILESYS;
|
||||
Pool2.size = POOL_SIZE_FILESYS;
|
||||
GxStrg_SetConfigEx(1, FILE_CFG_BUF, (UINT32)&Pool2);
|
||||
#if defined(_CPU2_LINUX_) && defined(_EMBMEM_EMMC_)
|
||||
// 3rd is for linux-pstore mounted by filesys
|
||||
MEM_RANGE Pool3;
|
||||
Pool3.Addr = Pool2.Addr + POOL_SIZE_FS_BUFFER;
|
||||
Pool3.Size = POOL_SIZE_FS_BUFFER;
|
||||
Pool3.Addr = Pool2.addr + POOL_SIZE_FS_BUFFER;
|
||||
Pool3.size = POOL_SIZE_FS_BUFFER;
|
||||
GxStrg_SetConfigEx(PST_DEV_ID, FILE_CFG_BUF, (UINT32)&Pool3);
|
||||
#endif
|
||||
#else
|
||||
|
@ -592,22 +592,24 @@ INT32 System_OnStrgInsert(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
// Open DCF
|
||||
dcfParm.Drive = (stg_id == 0) ? 'A' : 'B';
|
||||
#if (FS_MULTI_STRG_FUNC)
|
||||
if (POOL_CNT_DCF_BUFFER !=2) {
|
||||
DBG_FATAL("POOL_CNT_DCF_BUFFER be 2 for FS_MULTI_STRG_FUNC.\r\n");
|
||||
} else {
|
||||
// if (POOL_CNT_DCF_BUFFER !=2) {
|
||||
// DBG_FATAL("POOL_CNT_DCF_BUFFER be 2 for FS_MULTI_STRG_FUNC.\r\n");
|
||||
// } else {
|
||||
switch(stg_id) {
|
||||
case 0:
|
||||
dcfParm.WorkbuffAddr = dma_getCacheAddr(OS_GetMempoolAddr(POOL_ID_DCF_BUFFER));
|
||||
// dcfParm.WorkbuffAddr = dma_getCacheAddr(OS_GetMempoolAddr(POOL_ID_DCF_BUFFER));
|
||||
dcfParm.WorkbuffAddr = mempool_dcf;
|
||||
break;
|
||||
case 1:
|
||||
dcfParm.WorkbuffAddr = dma_getCacheAddr(OS_GetMempoolAddr(POOL_ID_DCF_BUFFER)) + POOL_SIZE_DCF_BUFFER;
|
||||
// dcfParm.WorkbuffAddr = dma_getCacheAddr(OS_GetMempoolAddr(POOL_ID_DCF_BUFFER)) + POOL_SIZE_DCF_BUFFER;
|
||||
dcfParm.WorkbuffAddr = mempool_dcf + POOL_SIZE_DCF_BUFFER;
|
||||
break;
|
||||
default:
|
||||
DBG_ERR("unknown stg_id=%d\r\n", stg_id);
|
||||
dcfParm.WorkbuffAddr = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// }
|
||||
#else
|
||||
|
||||
dcfParm.WorkbuffAddr = mempool_dcf;//dma_getCacheAddr(OS_GetMempoolAddr(POOL_ID_DCF_BUFFER));
|
||||
|
|
|
@ -25,5 +25,15 @@ void card_init(void)
|
|||
sdio_setCallBack(SDIO_CALLBACK_CARD_DETECT, (SDIO_CALLBACK_HDL)card_det_insert);
|
||||
sdio_setCallBack(SDIO_CALLBACK_WRITE_PROTECT, (SDIO_CALLBACK_HDL)card_det_wp);
|
||||
pStrg->SetParam(STRG_SET_MEMORY_REGION, mempool_storage_sdio, POOL_SIZE_STORAGE_SDIO);
|
||||
|
||||
#if FS_MULTI_STRG_FUNC
|
||||
pStrg = sdio2_getStorageObject(STRG_OBJ_FAT1);
|
||||
sdio2_setCallBack(SDIO_CALLBACK_CARD_DETECT, (SDIO_CALLBACK_HDL)card_det_insert);
|
||||
sdio2_setCallBack(SDIO_CALLBACK_WRITE_PROTECT, (SDIO_CALLBACK_HDL)card_det_wp);
|
||||
pStrg->SetParam(STRG_SET_MEMORY_REGION, mempool_storage_sdio + POOL_SIZE_STORAGE_SDIO, POOL_SIZE_STORAGE_SDIO);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "sys_fastboot.h"
|
||||
#include "PrjCfg.h"
|
||||
#include "DxHunting.h"
|
||||
#include <kwrap/debug.h>
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
#include "PrjInc.h"
|
||||
#include "wdt.h"
|
||||
|
@ -32,7 +33,7 @@ static void card_insert_job(void)
|
|||
int ret;
|
||||
|
||||
FILE_TSK_INIT_PARAM Param = {0};
|
||||
FS_HANDLE StrgDXH;
|
||||
FS_HANDLE StrgDXH, StrgDXH2;
|
||||
|
||||
printf("filesys_init b\r\n");
|
||||
memset(&Param, 0, sizeof(FILE_TSK_INIT_PARAM));
|
||||
|
@ -42,6 +43,49 @@ static void card_insert_job(void)
|
|||
StrgDXH = (FS_HANDLE)sdio_getStorageObject(STRG_OBJ_FAT1);
|
||||
#endif
|
||||
|
||||
#if FS_MULTI_STRG_FUNC
|
||||
StrgDXH2 = (FS_HANDLE)sdio2_getStorageObject(STRG_OBJ_FAT1);
|
||||
|
||||
|
||||
DBG_WRN("sdio2_getStorageObject\n");
|
||||
{
|
||||
UINT32 totoal_sectors = 0;
|
||||
// UINT32 uiPhyAddr = 0;
|
||||
// UINT32 uiPhySize = 0;
|
||||
// unsigned long long partition_ofs= 0, partition_size = 0;
|
||||
// unsigned long long usr_area_size = 0;
|
||||
STORAGE_OBJ* pStrg = sdio2_getStorageObject(STRG_OBJ_FAT1);
|
||||
// void *strg_mem = malloc(0x300);
|
||||
|
||||
// pStrg->SetParam(STRG_SET_MEMORY_REGION, (UINT32)strg_mem, 0x300);
|
||||
pStrg->Open(); //for initial emmc speed up, should open first, and then set partition
|
||||
pStrg->GetParam(STRG_GET_DEVICE_PHY_SECTORS, (UINT32)&totoal_sectors, 0);
|
||||
if (totoal_sectors == 0) {
|
||||
DBG_WRN("totoal_sectors couldn't be zero\n");
|
||||
}
|
||||
|
||||
DBG_WRN("storage_partition_init: totoal_sectors = %d\r\n", totoal_sectors);
|
||||
pStrg->SetParam(STRG_SET_PARTITION_SECTORS, 16, totoal_sectors - 16);
|
||||
// pStrg->Close();
|
||||
|
||||
//set the FAT size
|
||||
// ret = storage_get_partition_addr(&partition_ofs, &partition_size, PARTITION_PATH_ROOTFSL1);
|
||||
// usr_area_size = (unsigned long long)totoal_sectors*(unsigned long long)_EMBMEM_BLK_SIZE_;
|
||||
// uiPhyAddr = partition_ofs/_EMBMEM_BLK_SIZE_;
|
||||
// uiPhySize = (usr_area_size - partition_ofs)/_EMBMEM_BLK_SIZE_;
|
||||
// if (ret == 0) {
|
||||
// pStrg = EMB_GETSTRGOBJ(STRG_OBJ_FW_FAT);
|
||||
// pStrg->SetParam(STRG_SET_MEMORY_REGION, (UINT32)strg_mem, STRG_MEM_SIZE);
|
||||
// pStrg->SetParam(STRG_SET_PARTITION_SECTORS, uiPhyAddr, uiPhySize);
|
||||
// } else {
|
||||
// DBG_ERR("Cat get the %s path info\r\n", PARTITION_PATH_ROOTFSL1);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
uiPoolAddr = mempool_filesys;
|
||||
Param.FSParam.WorkBuf = uiPoolAddr;
|
||||
Param.FSParam.WorkBufSize = (POOL_SIZE_FILESYS);
|
||||
|
@ -52,11 +96,11 @@ static void card_insert_job(void)
|
|||
Param.FSParam.szMountPath[sizeof(Param.FSParam.szMountPath) - 1] = '\0';
|
||||
Param.FSParam.MaxOpenedFileNum = MAX_OPENED_FILE_NUM;
|
||||
if (FST_STA_OK != FileSys_Init(FileSys_GetOPS_uITRON())) {
|
||||
printf("FileSys_Init failed\r\n");
|
||||
DBG_WRN("FileSys_Init failed\r\n");
|
||||
}
|
||||
ret = FileSys_OpenEx('A', StrgDXH, &Param);
|
||||
if (FST_STA_OK != ret) {
|
||||
printf("FileSys_Open err %d\r\n", ret);
|
||||
DBG_WRN("FileSys_Open err %d\r\n", ret);
|
||||
}
|
||||
// call the function to wait init finish
|
||||
FileSys_WaitFinishEx('A');
|
||||
|
@ -64,19 +108,42 @@ static void card_insert_job(void)
|
|||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
if(TRUE == sf_check_card_full())
|
||||
{
|
||||
printf("ERR card full\r\n");
|
||||
DBG_WRN("ERR card full\r\n");
|
||||
fastboot_set_done(BOOT_INIT_FILESYSOK);
|
||||
}
|
||||
else
|
||||
{
|
||||
fastboot_set_done(BOOT_INIT_FILESYSOK);
|
||||
sf_log_confg();
|
||||
sf_log_open();
|
||||
// sf_log_confg();
|
||||
// sf_log_open();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FS_MULTI_STRG_FUNC
|
||||
uiPoolAddr = mempool_filesys + POOL_SIZE_FILESYS;
|
||||
Param.FSParam.WorkBuf = uiPoolAddr;
|
||||
Param.FSParam.WorkBufSize = (POOL_SIZE_FILESYS);
|
||||
// support exFAT
|
||||
Param.FSParam.bSupportExFAT = FALSE;
|
||||
//Param.pDiskErrCB = (FileSys_CB)Card_InitCB;
|
||||
strncpy(Param.FSParam.szMountPath, "/mnt/sd2", sizeof(Param.FSParam.szMountPath) - 1); //only used by FsLinux
|
||||
Param.FSParam.szMountPath[sizeof(Param.FSParam.szMountPath) - 1] = '\0';
|
||||
Param.FSParam.MaxOpenedFileNum = MAX_OPENED_FILE_NUM;
|
||||
// if (FST_STA_OK != FileSys_Init(FileSys_GetOPS_uITRON())) {
|
||||
// printf("FileSys_Init failed\r\n");
|
||||
// }
|
||||
DBG_WRN("Open B:\n");
|
||||
ret = FileSys_OpenEx('B', StrgDXH2, &Param);
|
||||
if (FST_STA_OK != ret) {
|
||||
printf("FileSys_Open err %d\r\n", ret);
|
||||
}
|
||||
// call the function to wait init finish
|
||||
FileSys_WaitFinishEx('B');
|
||||
// FileSys_SetParamEx('B', FST_PARM_UPDATE_FSINFO , TRUE);
|
||||
#endif
|
||||
|
||||
//fastboot_set_done(BOOT_INIT_FILESYSOK);
|
||||
printf("filesys_init e\r\n");
|
||||
DBG_WRN("filesys_init e\r\n");
|
||||
}
|
||||
|
||||
#if !defined(_EMBMEM_EMMC_)
|
||||
|
|
|
@ -60,7 +60,11 @@ void mempool_init(void)
|
|||
UINT32 pa;
|
||||
HD_RESULT ret;
|
||||
|
||||
#if FS_MULTI_STRG_FUNC
|
||||
ret = vendor_common_mem_alloc_fixed_pool("sdio", &pa, (void **)&va, POOL_SIZE_STORAGE_SDIO * 2, DDR_ID0);
|
||||
#else
|
||||
ret = vendor_common_mem_alloc_fixed_pool("sdio", &pa, (void **)&va, POOL_SIZE_STORAGE_SDIO, DDR_ID0);
|
||||
#endif
|
||||
if (ret != HD_OK) {
|
||||
return;
|
||||
}
|
||||
|
@ -77,7 +81,11 @@ void mempool_init(void)
|
|||
}
|
||||
mempool_storage_nor = (UINT32)va;
|
||||
|
||||
#if FS_MULTI_STRG_FUNC
|
||||
ret = vendor_common_mem_alloc_fixed_pool("filesys", &pa, (void **)&va, POOL_SIZE_FILESYS * 2, DDR_ID0);
|
||||
#else
|
||||
ret = vendor_common_mem_alloc_fixed_pool("filesys", &pa, (void **)&va, POOL_SIZE_FILESYS, DDR_ID0);
|
||||
#endif
|
||||
if (ret != HD_OK) {
|
||||
return;
|
||||
}
|
||||
|
@ -215,11 +223,17 @@ void mempool_init(void)
|
|||
mempool_usbcmd_va = (UINT32)va;
|
||||
#endif
|
||||
#if (HUNTING_CAMERA_MODEL == ENABLE)
|
||||
|
||||
#if (FS_MULTI_STRG_FUNC)
|
||||
ret = vendor_common_mem_alloc_fixed_pool("dcf", &pa, (void **)&va, POOL_SIZE_DCF_BUFFER * 2, DDR_ID0);
|
||||
#else
|
||||
ret = vendor_common_mem_alloc_fixed_pool("dcf", &pa, (void **)&va, POOL_SIZE_DCF_BUFFER, DDR_ID0);
|
||||
#endif
|
||||
if (ret != HD_OK) {
|
||||
return;
|
||||
}
|
||||
mempool_dcf = (UINT32)va;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ static CHAR g_photo_fast_write_file_Path[NMC_TOTALFILEPATH_MAX_LE
|
|||
static INT32 g_photo_fast_id_mapping[PHOTO_CAP_ID_MAX] = {-1,-1};
|
||||
static PHOTO_FILENAME_CB *g_fpPhotoFastFileNameCB = NULL;
|
||||
static DCF_HANDLE g_dcf_hdl = 0;
|
||||
static DCF_HANDLE g_dcf_hdl2 = 0;
|
||||
static HD_PATH_ID g_video_enc_path[PHOTO_ENC_JPG_TYPE_MAX_ID] = {0};
|
||||
static UINT32 g_bVideoEncPathStart[PHOTO_ENC_JPG_TYPE_MAX_ID] = {0};
|
||||
static HD_VIDEOENC_BUFINFO g_enc_buf_info[PHOTO_ENC_JPG_TYPE_MAX_ID] = {0};
|
||||
|
@ -722,6 +723,31 @@ INT32 PhotoFast_FileNaming_Open(void)
|
|||
DCF_SetFileFreeChars(DCF_FILE_TYPE_ANYFORMAT, DCF_FILE_NAME);
|
||||
DCF_ScanObj();
|
||||
|
||||
#if (FS_MULTI_STRG_FUNC)
|
||||
{
|
||||
DCF_OPEN_PARM dcfParm = {
|
||||
.Drive = 'B',
|
||||
.WorkbuffAddr = mempool_dcf + POOL_SIZE_DCF_BUFFER,
|
||||
.WorkbuffSize = POOL_SIZE_DCF_BUFFER,
|
||||
};
|
||||
g_dcf_hdl2 = DCF_Open(&dcfParm);
|
||||
if(g_dcf_hdl2 < 0){
|
||||
DBG_ERR("get dcf handle error!\n");
|
||||
}
|
||||
|
||||
|
||||
DBG_WRN("DCF_ScanObjEx emmc handle=%d\n", g_dcf_hdl2);
|
||||
// DCF_SetParm(DCF_PRMID_REMOVE_DUPLICATE_FOLDER, TRUE);
|
||||
// DCF_SetParm(DCF_PRMID_REMOVE_DUPLICATE_FILE, TRUE);
|
||||
// DCF_SetParm(DCF_PRMID_SET_VALID_FILE_FMT, DCF_FILE_TYPE_JPG|DCF_FILE_TYPE_MP4|DCF_FILE_TYPE_MOV);
|
||||
// DCF_SetParm(DCF_PRMID_SET_DEP_FILE_FMT, DCF_FILE_TYPE_JPG|DCF_FILE_TYPE_WAV|DCF_FILE_TYPE_MPO);
|
||||
// DCF_SetDirFreeChars(DCF_DIR_NAME);
|
||||
// DCF_SetFileFreeChars(DCF_FILE_TYPE_ANYFORMAT, DCF_FILE_NAME);
|
||||
DCF_ScanObjEx(g_dcf_hdl2);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -734,6 +760,11 @@ INT32 PhotoFast_FileNaming_Close(void)
|
|||
g_dcf_hdl = -1;
|
||||
}
|
||||
|
||||
#if (FS_MULTI_STRG_FUNC)
|
||||
DCF_Close(g_dcf_hdl2);
|
||||
g_dcf_hdl2 = -1;
|
||||
#endif
|
||||
|
||||
DCF_UnInstallID();
|
||||
}
|
||||
|
||||
|
@ -856,6 +887,11 @@ INT32 PhotoFast_WriteFile(UINT32 Addr, UINT32 Size, UINT32 Fmt, UINT32 uiPathId,
|
|||
INT32 rt;
|
||||
UINT32 Length;
|
||||
CHAR FilePath[NMC_TOTALFILEPATH_MAX_LEN];
|
||||
|
||||
#if FS_MULTI_STRG_FUNC
|
||||
CHAR FilePath2[NMC_TOTALFILEPATH_MAX_LEN];
|
||||
#endif
|
||||
|
||||
UINT32 fileType;
|
||||
UINT32 open_flag;
|
||||
UINT32 nextFolderID = 0, nextFileID = 0;
|
||||
|
@ -901,6 +937,27 @@ INT32 PhotoFast_WriteFile(UINT32 Addr, UINT32 Size, UINT32 Fmt, UINT32 uiPathId,
|
|||
DCF_AddDBfile(FilePath);
|
||||
DBG_DUMP("%s added to DCF\r\n", FilePath);
|
||||
}
|
||||
|
||||
#if 0//FS_MULTI_STRG_FUNC
|
||||
|
||||
if (DCF_GetDBInfoEx(g_dcf_hdl2, DCF_INFO_IS_9999)) {
|
||||
DBG_ERR("Exceed max dcf file!\r\n");
|
||||
return FST_STA_NOFREE_SPACE;
|
||||
}
|
||||
else {
|
||||
if (Fmt == HD_CODEC_TYPE_RAW){
|
||||
fileType = DCF_FILE_TYPE_RAW;
|
||||
}
|
||||
else{
|
||||
fileType = DCF_FILE_TYPE_JPG;
|
||||
}
|
||||
//DCF_GetNextIDEx(g_dcf_hdl2, &nextFolderID,&nextFileID);
|
||||
DCF_MakeObjPathEx(g_dcf_hdl2, nextFolderID, nextFileID, fileType, FilePath2);
|
||||
DCF_AddDBfileEx(g_dcf_hdl2, FilePath2);
|
||||
DBG_DUMP("%s added to DCF2\r\n", FilePath2);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
else{
|
||||
strncpy(FilePath, Path, sizeof(FilePath));
|
||||
|
@ -948,6 +1005,29 @@ INT32 PhotoFast_WriteFile(UINT32 Addr, UINT32 Size, UINT32 Fmt, UINT32 uiPathId,
|
|||
rt =FST_STA_ERROR;
|
||||
}
|
||||
|
||||
#if FS_MULTI_STRG_FUNC
|
||||
|
||||
DBG_WRN("write %s\n", FilePath2);
|
||||
if ((fp = FileSys_OpenFile(FilePath2, open_flag)) != NULL) {
|
||||
Length = Size;
|
||||
|
||||
rt = FileSys_WriteFile(fp, (UINT8 *)Addr, &Length, 0, NULL);
|
||||
FileSys_FlushFile(fp);
|
||||
FileSys_CloseFile(fp);
|
||||
if (rt == FST_STA_OK) {
|
||||
// DCF_AddDBfile(FilePath);
|
||||
// DBG_DUMP("%s added to DCF\r\n", FilePath);
|
||||
} else {
|
||||
DBG_ERR("Addr=0x%x,Size=0x%x,Fmt=%d\r\n", Addr, Size, Fmt);
|
||||
}
|
||||
}else{
|
||||
DBG_ERR("FileSys_OpenFile fail\r\n");
|
||||
rt =FST_STA_ERROR;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,10 +153,10 @@ ER AppInit_ModeUSBMSDC(void)
|
|||
MSDCInfo.msdc_vendor_cb = NULL;
|
||||
//#NT#2016/12/20#Niven Cho -begin
|
||||
//#NT#MULTI_DRIVE
|
||||
#if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
char *pDxName2 = NULL;
|
||||
DX_HANDLE pStrgDev2 = 0;
|
||||
#endif
|
||||
// #if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
// char *pDxName2 = NULL;
|
||||
// DX_HANDLE pStrgDev2 = 0;
|
||||
// #endif
|
||||
|
||||
pStrgDev = Dx_GetObject(DX_CLASS_STORAGE_EXT | FS_DX_TYPE_DRIVE_A);
|
||||
|
||||
|
@ -178,21 +178,21 @@ ER AppInit_ModeUSBMSDC(void)
|
|||
}
|
||||
DBG_DUMP("===>%s\r\n", pDxName);
|
||||
|
||||
#if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
MSDCInfo.pStrgHandle[1] = pStrgDev2;
|
||||
// #if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
// MSDCInfo.pStrgHandle[1] = pStrgDev2;
|
||||
|
||||
if (Dx_GetInfo(pStrgDev2, DX_INFO_NAME, &pDxName2) != DX_OK) {
|
||||
pDxName2 = NULL;
|
||||
}
|
||||
#endif
|
||||
// if (Dx_GetInfo(pStrgDev2, DX_INFO_NAME, &pDxName2) != DX_OK) {
|
||||
// pDxName2 = NULL;
|
||||
// }
|
||||
// #endif
|
||||
|
||||
#if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
MSDCInfo.pStrgHandle[1] = pStrgDev2;
|
||||
// #if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
// MSDCInfo.pStrgHandle[1] = pStrgDev2;
|
||||
|
||||
if (Dx_GetInfo(pStrgDev2, DX_INFO_NAME, &pDxName2) != DX_OK) {
|
||||
pDxName2 = NULL;
|
||||
}
|
||||
#endif
|
||||
// if (Dx_GetInfo(pStrgDev2, DX_INFO_NAME, &pDxName2) != DX_OK) {
|
||||
// pDxName2 = NULL;
|
||||
// }
|
||||
// #endif
|
||||
|
||||
#if (FS_MULTI_STRG_FUNC == ENABLE)
|
||||
MSDCInfo.msdc_storage_detCB[0] = (MSDC_StorageDet_CB)DrvCARD_DetStrgCard;
|
||||
|
@ -280,7 +280,7 @@ INT32 MSDCExe_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
pLastStrgDev = GxStrg_GetDevice(0);
|
||||
|
||||
if (pLastStrgDev == 0) {
|
||||
//PowerOn_CB() POWERON_CB_SXOPEN 沒有提早啟動File System
|
||||
//PowerOn_CB() POWERON_CB_SXOPEN <EFBFBD>S<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ұ<EFBFBD>File System
|
||||
DBG_ERR("MSDC: Wait for FS start...\r\n");
|
||||
FileSys_WaitFinish();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user