1.mcu通信改为uart
This commit is contained in:
parent
58bc7b0d2c
commit
dbfa657247
|
@ -1 +1 @@
|
||||||
/home/payton/na51089_linux_sdk/BSP/linux-kernel/arch/arm/plat-novatek/include/plat-na51089
|
/home/payton/S530/BSP/linux-kernel/arch/arm/plat-novatek/include/plat-na51089
|
|
@ -1 +1 @@
|
||||||
/home/payton/na51089_linux_sdk/BSP/linux-kernel/arch/arm/plat-novatek/plat-na51089
|
/home/payton/S530/BSP/linux-kernel/arch/arm/plat-novatek/plat-na51089
|
|
@ -1 +1 @@
|
||||||
/home/payton/na51089_linux_sdk/code/hdal
|
/home/payton/S530/code/hdal
|
|
@ -1 +1 @@
|
||||||
/home/payton/na51089_linux_sdk/code/vos
|
/home/payton/S530/code/vos
|
Binary file not shown.
|
@ -914,8 +914,8 @@
|
||||||
#define PHOTO_PREVIEW_SLICE_ENC_FUNC ENABLE
|
#define PHOTO_PREVIEW_SLICE_ENC_FUNC ENABLE
|
||||||
#define PHOTO_PREVIEW_SLICE_ENC_VER2_FUNC ENABLE
|
#define PHOTO_PREVIEW_SLICE_ENC_VER2_FUNC ENABLE
|
||||||
#define DZOOM_FUNC ENABLE
|
#define DZOOM_FUNC ENABLE
|
||||||
#define HUNTING_MCU_I2C ENABLE
|
#define HUNTING_MCU_I2C DISABLE
|
||||||
#define HUNTING_MCU_UART DISABLE
|
#define HUNTING_MCU_UART ENABLE
|
||||||
#define HUNTING_IR_LED_940 ENABLE//DISABLE
|
#define HUNTING_IR_LED_940 ENABLE//DISABLE
|
||||||
#define SF_BASE_VERSION "7MD4RCwD3T1"
|
#define SF_BASE_VERSION "7MD4RCwD3T1"
|
||||||
|
|
||||||
|
|
BIN
code/hdal/vendor/output/libvendor_ai2_pub.a
vendored
BIN
code/hdal/vendor/output/libvendor_ai2_pub.a
vendored
Binary file not shown.
BIN
code/hdal/vendor/output/libvendor_ai2_pub2.a
vendored
BIN
code/hdal/vendor/output/libvendor_ai2_pub2.a
vendored
Binary file not shown.
|
@ -104,8 +104,8 @@ extern "C" {
|
||||||
|
|
||||||
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
|
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
|
||||||
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
|
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
|
||||||
#define ENGINESDIR "/home/payton/na51089_linux_sdk/code/lib/external/__install/lib/engines"
|
#define ENGINESDIR "/home/payton/S530/code/lib/external/__install/lib/engines"
|
||||||
#define OPENSSLDIR "/home/payton/na51089_linux_sdk/code/lib/external/__install/ssl"
|
#define OPENSSLDIR "/home/payton/S530/code/lib/external/__install/ssl"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,13 @@
|
||||||
extern "C"{
|
extern "C"{
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#include <sf_mcu.h>
|
||||||
|
|
||||||
#define SERIAL_DEVICE_PATH "/dev/ttyS2"
|
#define SERIAL_DEVICE_PATH "/dev/ttyS2"
|
||||||
|
#define BUF_REG_SIZE (REG_SIZE*2+8)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char buf[32];
|
unsigned char buf[BUF_REG_SIZE];
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
}SMAPBUF_t;
|
}SMAPBUF_t;
|
||||||
/*
|
/*
|
||||||
|
@ -63,6 +65,11 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len);
|
||||||
void sf_commu_mcu_task_start(void);
|
void sf_commu_mcu_task_start(void);
|
||||||
void sf_commu_mcu_task_stop(void);
|
void sf_commu_mcu_task_stop(void);
|
||||||
unsigned char sf_commu_mcu_task_running(void);
|
unsigned char sf_commu_mcu_task_running(void);
|
||||||
|
unsigned int sf_get_mcu_reg_ack_depack_many(unsigned char reg[], unsigned char val[], unsigned int * num);
|
||||||
|
int sf_set_mcu_reg_many(unsigned char reg[], unsigned char val[], unsigned int num);
|
||||||
|
int sf_get_mcu_reg_many(unsigned char reg[], unsigned int num);
|
||||||
|
int sf_commu_set_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num);
|
||||||
|
int sf_commu_get_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
#define WDT_OFF 0x01
|
#define WDT_OFF 0x01
|
||||||
#define DEBUG_MODE_ON 0x02
|
#define DEBUG_MODE_ON 0x02
|
||||||
|
|
||||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
#if 0//defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
#define REG_SIZE 82
|
#define REG_SIZE 82
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -210,7 +210,7 @@ typedef enum
|
||||||
RESERVER13,
|
RESERVER13,
|
||||||
RESERVER14,
|
RESERVER14,
|
||||||
}PARA_REG;
|
}PARA_REG;
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
POWEROFF_COUNTDOWN = 1,
|
POWEROFF_COUNTDOWN = 1,
|
||||||
|
@ -239,7 +239,8 @@ typedef enum {
|
||||||
WORKING_TIME_ALL = 0xff,
|
WORKING_TIME_ALL = 0xff,
|
||||||
}WORKING_TIME_TYPE;
|
}WORKING_TIME_TYPE;
|
||||||
|
|
||||||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
//#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||||
|
#if 1
|
||||||
|
|
||||||
#define REG_SIZE 91
|
#define REG_SIZE 91
|
||||||
|
|
||||||
|
@ -349,7 +350,6 @@ typedef enum
|
||||||
RESERVER12 = 89,
|
RESERVER12 = 89,
|
||||||
RESERVER13 = 90,
|
RESERVER13 = 90,
|
||||||
}PARA_REG;
|
}PARA_REG;
|
||||||
#else
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ typedef struct sfCAMERA_CMD_S
|
||||||
UINT8 cameraRestart;
|
UINT8 cameraRestart;
|
||||||
UINT8 GotoServerGetPara;
|
UINT8 GotoServerGetPara;
|
||||||
} SF_CAMERA_CMD_S;
|
} SF_CAMERA_CMD_S;
|
||||||
|
void sf_mcu_dataready_ck(UINT8 startMode);
|
||||||
void sf_mcu_dataready_get(void);
|
void sf_mcu_dataready_get(void);
|
||||||
UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val);
|
UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val);
|
||||||
UINT32 sf_gpio_get_status(UINT32 ipin);
|
UINT32 sf_gpio_get_status(UINT32 ipin);
|
||||||
|
|
|
@ -125,7 +125,7 @@ static unsigned short sf_crc16_check(unsigned char * dataIn, int length)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char sndBuf[32] =
|
static unsigned char sndBuf[BUF_REG_SIZE] =
|
||||||
{
|
{
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
@ -137,8 +137,10 @@ SMAPBUF_t smap_buf =
|
||||||
|
|
||||||
int SMAP_waitAck = 0;
|
int SMAP_waitAck = 0;
|
||||||
|
|
||||||
unsigned char mcu_buf[32] = {0};
|
unsigned char mcu_buf[BUF_REG_SIZE] = {0};
|
||||||
unsigned int mcu_buf_len = 0;
|
unsigned int mcu_buf_len = 0;
|
||||||
|
unsigned char cmpRegBuf[BUF_REG_SIZE] = {0};
|
||||||
|
unsigned char cmpValBuf[BUF_REG_SIZE] = {0};
|
||||||
|
|
||||||
static unsigned char sf_commu_mcu_exit = 1;
|
static unsigned char sf_commu_mcu_exit = 1;
|
||||||
static VK_TASK_HANDLE sfCommuMcuThread = 0;
|
static VK_TASK_HANDLE sfCommuMcuThread = 0;
|
||||||
|
@ -351,9 +353,9 @@ int sf_commu_write(unsigned char * buf, int len)
|
||||||
int ret = FAIL;
|
int ret = FAIL;
|
||||||
|
|
||||||
ret = write(gsfd, buf, len);
|
ret = write(gsfd, buf, len);
|
||||||
printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
|
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
{
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -364,9 +366,12 @@ int sf_commu_read(unsigned char * buf, int len)
|
||||||
{
|
{
|
||||||
int ret = SUCCESS;
|
int ret = SUCCESS;
|
||||||
ret = read(gsfd, buf, len);
|
ret = read(gsfd, buf, len);
|
||||||
printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
|
if(ret < 0)
|
||||||
if(ret < 0)
|
{
|
||||||
return FAIL;
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -416,7 +421,6 @@ int sf_get_mcu_reg(unsigned char reg)
|
||||||
unsigned short crc_end = 0;
|
unsigned short crc_end = 0;
|
||||||
int ret = FAIL;
|
int ret = FAIL;
|
||||||
//uint8_t i = 0;
|
//uint8_t i = 0;
|
||||||
CHKPNT;
|
|
||||||
memset(sndBuf, 0x00, sizeof(sndBuf));
|
memset(sndBuf, 0x00, sizeof(sndBuf));
|
||||||
sndBuf[index] = 0x55;
|
sndBuf[index] = 0x55;
|
||||||
index++;
|
index++;
|
||||||
|
@ -446,6 +450,97 @@ int sf_get_mcu_reg(unsigned char reg)
|
||||||
return 0x01;
|
return 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sf_set_mcu_reg_many(unsigned char reg[], unsigned char val[], unsigned int num)
|
||||||
|
{
|
||||||
|
unsigned short index = 0;
|
||||||
|
unsigned short crc = 0;
|
||||||
|
unsigned short crc_start = 0;
|
||||||
|
unsigned short crc_end = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
int ret = FAIL;
|
||||||
|
memset(sndBuf, 0x00, sizeof(sndBuf));
|
||||||
|
// uint8_t i = 0;
|
||||||
|
sndBuf[index] = 0x55;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xAA;
|
||||||
|
index++;
|
||||||
|
crc_start = index;
|
||||||
|
sndBuf[index] = 0x04;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = num;
|
||||||
|
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = reg[i];
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = val[i];
|
||||||
|
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
crc_end = index;
|
||||||
|
crc = sf_crc16_check(&sndBuf[crc_start], crc_end - crc_start);
|
||||||
|
sndBuf[index] = (crc & 0xff00) >> 8;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = crc & 0x00ff;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xFF;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xEE;
|
||||||
|
ret = sf_commu_write(sndBuf, index + 1);
|
||||||
|
if(ret == FAIL)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
}
|
||||||
|
return 0x03;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sf_get_mcu_reg_many(unsigned char reg[], unsigned int num)
|
||||||
|
{
|
||||||
|
unsigned short index = 0;
|
||||||
|
unsigned short crc = 0;
|
||||||
|
unsigned short crc_start = 0;
|
||||||
|
unsigned short crc_end = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
int ret = FAIL;
|
||||||
|
//uint8_t i = 0;
|
||||||
|
memset(sndBuf, 0x00, sizeof(sndBuf));
|
||||||
|
sndBuf[index] = 0x55;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xAA;
|
||||||
|
index++;
|
||||||
|
crc_start = index;
|
||||||
|
sndBuf[index] = 0x02;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = num;
|
||||||
|
|
||||||
|
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = reg[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
index++;
|
||||||
|
crc_end = index;
|
||||||
|
crc = sf_crc16_check(&sndBuf[crc_start], crc_end - crc_start);
|
||||||
|
sndBuf[index] = (crc & 0xff00) >> 8;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = crc & 0x00ff;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xFF;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xEE;
|
||||||
|
|
||||||
|
ret = sf_commu_write(sndBuf, index + 1);
|
||||||
|
if(ret == FAIL)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int sf_set_mcu_reg_ack_depack(unsigned int * address, unsigned int * value)
|
unsigned int sf_set_mcu_reg_ack_depack(unsigned int * address, unsigned int * value)
|
||||||
{
|
{
|
||||||
unsigned short crc1 = (((unsigned short) smap_buf.buf[smap_buf.index - 4]) << 8) | smap_buf.buf[smap_buf.index - 3];
|
unsigned short crc1 = (((unsigned short) smap_buf.buf[smap_buf.index - 4]) << 8) | smap_buf.buf[smap_buf.index - 3];
|
||||||
|
@ -497,6 +592,42 @@ unsigned int sf_get_mcu_reg_ack_depack(unsigned int * address, unsigned int * va
|
||||||
return (unsigned int)smap_buf.buf[2];
|
return (unsigned int)smap_buf.buf[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int sf_get_mcu_reg_ack_depack_many(unsigned char reg[], unsigned char val[], unsigned int * num)
|
||||||
|
{
|
||||||
|
unsigned short crc1 = (((unsigned short) smap_buf.buf[smap_buf.index - 4] << 8) & 0xff00) | smap_buf.buf[smap_buf.index - 3];
|
||||||
|
unsigned short crc2 = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
unsigned int j = 4;
|
||||||
|
|
||||||
|
crc2 = sf_crc16_check(&smap_buf.buf[2], smap_buf.index - 6);
|
||||||
|
|
||||||
|
if (crc2 != crc1)
|
||||||
|
{
|
||||||
|
printf("crc error crc1 %d, crc2 %d, function %s, file %s, line %d\r\n", crc1, crc2, __FUNCTION__,
|
||||||
|
__FILE__, __LINE__);
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
*num = smap_buf.buf[3];
|
||||||
|
|
||||||
|
for(i = 0; i < *num; i++)
|
||||||
|
{
|
||||||
|
reg[i]= smap_buf.buf[j];
|
||||||
|
j++;
|
||||||
|
val[i]= smap_buf.buf[j];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (smap_buf.buf[2] == 0xFF) /* error command 0xff */
|
||||||
|
{
|
||||||
|
printf("%s:%d command error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (unsigned int)smap_buf.buf[2];
|
||||||
|
}
|
||||||
|
|
||||||
int sf_commu_wait(unsigned char cmd)
|
int sf_commu_wait(unsigned char cmd)
|
||||||
{
|
{
|
||||||
volatile char trytimes = 0;
|
volatile char trytimes = 0;
|
||||||
|
@ -517,7 +648,9 @@ void sf_commu_reset(void)
|
||||||
{
|
{
|
||||||
smap_buf.index = 0;
|
smap_buf.index = 0;
|
||||||
SMAP_waitAck = 0;
|
SMAP_waitAck = 0;
|
||||||
memset(smap_buf.buf, 0x00, 32);
|
memset(smap_buf.buf, 0x00, sizeof(smap_buf.buf));
|
||||||
|
memset(cmpRegBuf, 0x00, sizeof(cmpRegBuf));
|
||||||
|
memset(cmpValBuf, 0x00, sizeof(cmpValBuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
int sf_commu_set_mcu(unsigned char reg, unsigned char val)
|
int sf_commu_set_mcu(unsigned char reg, unsigned char val)
|
||||||
|
@ -525,7 +658,7 @@ int sf_commu_set_mcu(unsigned char reg, unsigned char val)
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
unsigned int address = 0;
|
unsigned int address = 0;
|
||||||
unsigned int value = 0;
|
unsigned int value = 0;
|
||||||
printf("Reg_Data[%02d,0x%02x]\n", reg,val);
|
//printf("W_addr[%02d,0x%02x]\n", reg,val);
|
||||||
sf_commu_reset();
|
sf_commu_reset();
|
||||||
sf_set_mcu_reg(reg, val);
|
sf_set_mcu_reg(reg, val);
|
||||||
ret = sf_commu_wait(0x03);
|
ret = sf_commu_wait(0x03);
|
||||||
|
@ -554,17 +687,17 @@ int sf_commu_get_mcu(unsigned char reg)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned int address = 0;
|
unsigned int address = 0;
|
||||||
unsigned int value = 0;
|
unsigned int value = 0;
|
||||||
CHKPNT;
|
|
||||||
|
|
||||||
sf_commu_reset();
|
sf_commu_reset();
|
||||||
sf_get_mcu_reg(reg);
|
sf_get_mcu_reg(reg);
|
||||||
ret = sf_commu_wait(0x01);
|
ret = sf_commu_wait(0x01);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
{
|
{
|
||||||
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
||||||
sf_commu_reset();
|
sf_commu_reset();
|
||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sf_get_mcu_reg_ack_depack(&address, &value);
|
ret = sf_get_mcu_reg_ack_depack(&address, &value);
|
||||||
if (ret < 0 || address != reg)
|
if (ret < 0 || address != reg)
|
||||||
{
|
{
|
||||||
|
@ -578,6 +711,79 @@ int sf_commu_get_mcu(unsigned char reg)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
int sf_commu_set_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num)
|
||||||
|
{
|
||||||
|
int ret = -1;
|
||||||
|
//unsigned int address = 0;
|
||||||
|
//unsigned int value = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
//printf("W_addr[%02d,0x%02x]\n", reg,val);
|
||||||
|
sf_commu_reset();
|
||||||
|
sf_set_mcu_reg_many(reg, val, *num);
|
||||||
|
ret = sf_commu_wait(0x04);
|
||||||
|
if(ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
||||||
|
sf_commu_reset();
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = sf_get_mcu_reg_ack_depack_many(cmpRegBuf, cmpValBuf, num);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(i = 0; i < *num; i++)
|
||||||
|
{
|
||||||
|
if((reg[i] != cmpRegBuf[i]) || (val[i] != cmpValBuf[i]))
|
||||||
|
{
|
||||||
|
printf("%s:%d error address %d, value %d get address %d, value %d\r\n", __FUNCTION__, __LINE__, reg[i], val[i], cmpRegBuf[i], cmpValBuf[i]);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sf_commu_get_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
|
||||||
|
sf_commu_reset();
|
||||||
|
sf_get_mcu_reg_many(reg,*num);
|
||||||
|
ret = sf_commu_wait(0x02);
|
||||||
|
if(ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
||||||
|
sf_commu_reset();
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = sf_get_mcu_reg_ack_depack_many(cmpRegBuf, val, num);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(i = 0; i < *num; i++)
|
||||||
|
{
|
||||||
|
if(reg[i] != cmpRegBuf[i])
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
int sf_getRegFromMcu_depack(unsigned char * dataToParse, unsigned int datalen, unsigned char * regAddr, unsigned char * regVal)
|
int sf_getRegFromMcu_depack(unsigned char * dataToParse, unsigned int datalen, unsigned char * regAddr, unsigned char * regVal)
|
||||||
{
|
{
|
||||||
|
@ -660,6 +866,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
|
||||||
//stMessageBuf.arg2 = SF_KEY_PIN_DATAREADY;
|
//stMessageBuf.arg2 = SF_KEY_PIN_DATAREADY;
|
||||||
//sf_com_message_send_to_app(&stMessageBuf);
|
//sf_com_message_send_to_app(&stMessageBuf);
|
||||||
ret = 0x05;
|
ret = 0x05;
|
||||||
|
sf_mcu_dataready_ck((val[0] & 0x1F));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -691,7 +898,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
|
||||||
THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
||||||
{
|
{
|
||||||
THREAD_ENTRY();
|
THREAD_ENTRY();
|
||||||
static unsigned char buffer[32] = {0};
|
static unsigned char buffer[BUF_REG_SIZE] = {0};
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int readLen = 0;
|
int readLen = 0;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
@ -704,17 +911,18 @@ THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
||||||
unsigned char copy_size = 0;
|
unsigned char copy_size = 0;
|
||||||
//sf_commu_mcu_interface_init(115200, 'N', 8, 1, 'N');
|
//sf_commu_mcu_interface_init(115200, 'N', 8, 1, 'N');
|
||||||
//sf_commu_mcu_open();
|
//sf_commu_mcu_open();
|
||||||
|
//FLGPTN FlgPtn;
|
||||||
|
|
||||||
printf("%s:%d\r\n", __FUNCTION__, __LINE__);
|
|
||||||
mcubuf_reset();
|
mcubuf_reset();
|
||||||
CHKPNT;
|
CHKPNT;
|
||||||
while(sf_commu_mcu_exit == 0)
|
while(sf_commu_mcu_exit == 0)
|
||||||
{
|
{
|
||||||
readLen = sf_commu_read(buffer + len, 32);
|
readLen = sf_commu_read(buffer + len, BUF_REG_SIZE);
|
||||||
|
|
||||||
if(readLen > 0)
|
if(readLen > 0)
|
||||||
{
|
{
|
||||||
len += readLen;
|
len += readLen;
|
||||||
|
//printf("%s:%d len = %d readLen = %d\n",__FUNCTION__,__LINE__, len, readLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(i < len)
|
while(i < len)
|
||||||
|
|
|
@ -62,10 +62,10 @@ static UINT32 simCardInsert=0;
|
||||||
static UINT8 gModuleSleep = 1;
|
static UINT8 gModuleSleep = 1;
|
||||||
static UINT32 SmsCheck = 0;
|
static UINT32 SmsCheck = 0;
|
||||||
static SF_CAMERA_CMD_S CameraCmd = {0};
|
static SF_CAMERA_CMD_S CameraCmd = {0};
|
||||||
|
static UINT8 McuProductInfo = 0;
|
||||||
|
|
||||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||||
static UINT8 drNoResetTimeSync = FALSE; //0:reset; 1:no reset;
|
static UINT8 drNoResetTimeSync = FALSE; //0:reset; 1:no reset;
|
||||||
static UINT8 McuProductInfo = 0;
|
|
||||||
|
|
||||||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
static UINT8 isSignalReady = 0;
|
static UINT8 isSignalReady = 0;
|
||||||
|
@ -251,64 +251,6 @@ UINT8 sf_mcu_write(UINT32 reg, UINT32 data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
UINT8 sf_mcu_read(UINT32 reg, UINT8 *data)
|
|
||||||
{
|
|
||||||
UINT8 data2 = 0;
|
|
||||||
|
|
||||||
CHKPNT;
|
|
||||||
*data = sf_commu_get_mcu(reg);
|
|
||||||
//vos_util_delay_us(30);
|
|
||||||
|
|
||||||
data2 = sf_commu_get_mcu(reg);
|
|
||||||
printf("R_addr[%d]=0x%02x\n", reg, data2);
|
|
||||||
|
|
||||||
if(*data != data2)
|
|
||||||
{
|
|
||||||
printf("%s:%d ERROR\n", __FUNCTION__, __LINE__);
|
|
||||||
printf("[ERROR]reg:%d,data:%d,data2:%d\n", reg, *data, data2);
|
|
||||||
vos_util_delay_us(300);
|
|
||||||
*data = sf_commu_get_mcu(reg);
|
|
||||||
printf("[ERROR]reg:%d,data:%d,data2:%d\n", reg, *data, data2);
|
|
||||||
}
|
|
||||||
|
|
||||||
//vos_util_delay_us(200);
|
|
||||||
CHKPNT;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT8 sf_mcu_write(UINT32 reg, UINT32 data)
|
|
||||||
{
|
|
||||||
UINT8 data2 = 0;
|
|
||||||
|
|
||||||
sf_commu_set_mcu(reg, data);
|
|
||||||
//vos_util_delay_us(20);
|
|
||||||
|
|
||||||
data2 = sf_commu_get_mcu(reg);
|
|
||||||
printf("W_addr[%d]=0x%02x\n", reg, data2);
|
|
||||||
|
|
||||||
if(data != data2)
|
|
||||||
{
|
|
||||||
printf("%s:%d ERROR reg:%d,data:%d,data2:%d\n", __FUNCTION__, __LINE__, reg, data, data2);
|
|
||||||
vos_util_delay_us(300);
|
|
||||||
sf_commu_set_mcu(reg, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
//vos_util_delay_us(200);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int sf_mcu_init(void)
|
|
||||||
{
|
|
||||||
CHKPNT;
|
|
||||||
sf_commu_mcu_task_start();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
{
|
{
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
|
@ -320,19 +262,6 @@ UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************
|
|
||||||
Function: sf_get_daily_report_start_mode
|
|
||||||
Description: get dailyreport start mode
|
|
||||||
Input: N/A
|
|
||||||
Output: N/A
|
|
||||||
Return: 0:ON mode 1:OFF mode
|
|
||||||
Others: N/A
|
|
||||||
*************************************************/
|
|
||||||
UINT8 sf_get_daily_report_start_mode(void)
|
|
||||||
{
|
|
||||||
return DailyReportStartMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
Function: sf_mcu_power_on_para_get
|
Function: sf_mcu_power_on_para_get
|
||||||
Description: read MCU register data to update uipara and variable.
|
Description: read MCU register data to update uipara and variable.
|
||||||
|
@ -356,7 +285,7 @@ UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId)
|
||||||
}
|
}
|
||||||
|
|
||||||
sf_mcu_read(MCU_SUB_VER, &McuSubVersion);
|
sf_mcu_read(MCU_SUB_VER, &McuSubVersion);
|
||||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
#if 0//defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
sf_mcu_read(MCU_VER, &mcuVer);
|
sf_mcu_read(MCU_VER, &mcuVer);
|
||||||
McuVersion = mcuVer;
|
McuVersion = mcuVer;
|
||||||
#else
|
#else
|
||||||
|
@ -399,6 +328,170 @@ UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId)
|
||||||
return startMode;
|
return startMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
UINT8 sf_mcu_read(UINT32 reg, UINT8 *data)
|
||||||
|
{
|
||||||
|
//UINT8 data2 = 0;
|
||||||
|
|
||||||
|
//CHKPNT;
|
||||||
|
*data = sf_commu_get_mcu(reg);
|
||||||
|
//vos_util_delay_us(30);
|
||||||
|
|
||||||
|
//data2 = sf_commu_get_mcu(reg);
|
||||||
|
printf("R_addr[%d]=0x%02x\n", reg, *data);
|
||||||
|
|
||||||
|
/*if(*data != data2)
|
||||||
|
{
|
||||||
|
printf("%s:%d ERROR\n", __FUNCTION__, __LINE__);
|
||||||
|
printf("[ERROR]reg:%d,data:%d,data2:%d\n", reg, *data, data2);
|
||||||
|
vos_util_delay_us(300);
|
||||||
|
*data = sf_commu_get_mcu(reg);
|
||||||
|
printf("[ERROR]reg:%d,data:%d,data2:%d\n", reg, *data, data2);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//vos_util_delay_us(200);
|
||||||
|
//CHKPNT;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 sf_mcu_write(UINT32 reg, UINT32 data)
|
||||||
|
{
|
||||||
|
//UINT8 data2 = 0;
|
||||||
|
|
||||||
|
sf_commu_set_mcu(reg, data);
|
||||||
|
//vos_util_delay_us(20);
|
||||||
|
|
||||||
|
//data2 = sf_commu_get_mcu(reg);
|
||||||
|
printf("W_addr[%d]=0x%02x\n", reg, data);
|
||||||
|
|
||||||
|
/*if(data != data2)
|
||||||
|
{
|
||||||
|
printf("%s:%d ERROR reg:%d,data:%d,data2:%d\n", __FUNCTION__, __LINE__, reg, data, data2);
|
||||||
|
vos_util_delay_us(300);
|
||||||
|
sf_commu_set_mcu(reg, data);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//vos_util_delay_us(200);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int sf_mcu_init(void)
|
||||||
|
{
|
||||||
|
//CHKPNT;
|
||||||
|
sf_commu_mcu_task_start();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
|
{
|
||||||
|
UINT32 i;
|
||||||
|
unsigned int pnum = num;
|
||||||
|
if(0 <= sf_commu_set_mcu_many(reg, data, &pnum))
|
||||||
|
{
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
printf("W_addr[%d]=0x%02x\n", reg[i], data[i]);
|
||||||
|
}
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 sf_mcu_read_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
|
{
|
||||||
|
UINT32 i;
|
||||||
|
unsigned int pnum = num;
|
||||||
|
if(0 <= sf_commu_get_mcu_many(reg, data, &pnum))
|
||||||
|
{
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
printf("R_addr[%d]=0x%02x\n", reg[i], data[i]);
|
||||||
|
}
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
Function: sf_mcu_power_on_para_get
|
||||||
|
Description: read MCU register data to update uipara and variable.
|
||||||
|
Input: attrId:which kind of para want to get
|
||||||
|
Output: N/A
|
||||||
|
Return: start mode
|
||||||
|
Others: N/A
|
||||||
|
*************************************************/
|
||||||
|
UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId)
|
||||||
|
{
|
||||||
|
UINT8 dataTemp1 = 0, dataTemp2 = 0;
|
||||||
|
UINT8 startMode = 0;
|
||||||
|
//UINT8 mcuVer = 0;
|
||||||
|
UINT8 mcuReg[REG_SIZE] = { 0 };
|
||||||
|
UINT8 mcuData[REG_SIZE] = { 0 };
|
||||||
|
UINT8 i = 0;
|
||||||
|
|
||||||
|
if(attrId != SF_MCU_POWERON)
|
||||||
|
{
|
||||||
|
sf_mcu_read(START_MODE, &dataTemp1);
|
||||||
|
startMode = dataTemp1 & 0x1F;
|
||||||
|
|
||||||
|
return startMode;
|
||||||
|
}
|
||||||
|
mcuReg[i] = MCU_SUB_VER;
|
||||||
|
mcuReg[i++] = MCU_VER_L;
|
||||||
|
mcuReg[i++] = MCU_VER_H;
|
||||||
|
mcuReg[i++] = MCU_PRODUCT_INFO;
|
||||||
|
mcuReg[i++] = START_MODE;
|
||||||
|
mcuReg[i++] = LUMINANCE_L;
|
||||||
|
mcuReg[i++] = LUMINANCE_H;
|
||||||
|
sf_mcu_read_multi(mcuReg, mcuData, i);
|
||||||
|
i = 0;
|
||||||
|
McuSubVersion = mcuData[i];
|
||||||
|
|
||||||
|
McuVersion = mcuData[i++];
|
||||||
|
McuVersion = (UINT16)mcuData[i++] << 8 | McuVersion;
|
||||||
|
McuProductInfo = mcuData[i++];
|
||||||
|
dataTemp1 = mcuData[i++];
|
||||||
|
startMode = dataTemp1 & 0x1F;
|
||||||
|
DailyReportStartMode = (dataTemp1 & 0xc0) >> 6;
|
||||||
|
dataTemp1= mcuData[i++];
|
||||||
|
dataTemp2 = mcuData[i++];
|
||||||
|
IRSHTTER = (dataTemp2 << 8) | dataTemp1;
|
||||||
|
|
||||||
|
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
|
if(startMode == PWR_ON_TIME_SYNC)
|
||||||
|
{
|
||||||
|
startMode = PWR_ON_DAILY_REPORT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
if(startMode > PWR_ON_TIME_SEND) //if start mode err, USB IN default power on SETUP
|
||||||
|
{
|
||||||
|
startMode = PWR_ON_SETUP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf(" start mode = %d IRSHTTER = %d\n", startMode, IRSHTTER);
|
||||||
|
|
||||||
|
return startMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
Function: sf_get_daily_report_start_mode
|
||||||
|
Description: get dailyreport start mode
|
||||||
|
Input: N/A
|
||||||
|
Output: N/A
|
||||||
|
Return: 0:ON mode 1:OFF mode
|
||||||
|
Others: N/A
|
||||||
|
*************************************************/
|
||||||
|
UINT8 sf_get_daily_report_start_mode(void)
|
||||||
|
{
|
||||||
|
return DailyReportStartMode;
|
||||||
|
}
|
||||||
|
|
||||||
UINT8 sf_mcu_wdg_set(UINT8 value)
|
UINT8 sf_mcu_wdg_set(UINT8 value)
|
||||||
{
|
{
|
||||||
UINT8 i = 0;
|
UINT8 i = 0;
|
||||||
|
@ -554,6 +647,60 @@ UINT32 sf_gpio_get_status(UINT32 ipin)
|
||||||
return (UINT32) ((gpio_get_value(ipin) == 1) ? 1 : 0 );
|
return (UINT32) ((gpio_get_value(ipin) == 1) ? 1 : 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
Function: sf_mcu_dataready_get
|
||||||
|
Description:
|
||||||
|
Input: attrId:which kind of para want to get
|
||||||
|
Output: N/A
|
||||||
|
Return: N/A
|
||||||
|
Others: N/A
|
||||||
|
*************************************************/
|
||||||
|
void sf_mcu_dataready_ck(UINT8 startMode)
|
||||||
|
{
|
||||||
|
printf("startMode=%d\n", startMode);
|
||||||
|
#if 1
|
||||||
|
if(GxUSB_GetIsUSBPlug())//sf_gpio_get_status(GPIO_INT_USBPLUGIN))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sf_get_mode_flag())
|
||||||
|
{
|
||||||
|
if(startMode == 0) //OFF
|
||||||
|
{
|
||||||
|
sf_set_power_off_flag(1);
|
||||||
|
gModuleSleep = 0;
|
||||||
|
//LCD_BACKLIGHT_OFF;
|
||||||
|
//profLogPrintf(0,"[sf_mcu_dataready_get],APP_POWER_OFF_NORMAL");
|
||||||
|
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
|
||||||
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start
|
||||||
|
}
|
||||||
|
else if(startMode == 1) //SETUP
|
||||||
|
{
|
||||||
|
/*exit pir mode*/
|
||||||
|
}
|
||||||
|
else if(startMode == 3) //ON
|
||||||
|
{
|
||||||
|
sf_set_auto_off_time(0);
|
||||||
|
sf_set_pir_statu_flag(1);
|
||||||
|
printf("%s:%d-------PIR Key Pressed.------\n", __FUNCTION__, __LINE__);
|
||||||
|
//Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if((startMode == 0) || (startMode == 1)) //PIR MODE: ON->OFF/ ON->SETUP
|
||||||
|
{
|
||||||
|
gModuleSleep = 0; //power off 4G module
|
||||||
|
sf_set_power_off_flag(1);
|
||||||
|
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
|
||||||
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
Function: sf_mcu_dataready_get
|
Function: sf_mcu_dataready_get
|
||||||
Description:
|
Description:
|
||||||
|
@ -1249,7 +1396,7 @@ UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val)
|
||||||
if(gpsAlwaysFlag && simCardInsert)
|
if(gpsAlwaysFlag && simCardInsert)
|
||||||
temp |= 0x80;
|
temp |= 0x80;
|
||||||
|
|
||||||
mcuReg[i] = FUNCTION_SWTICH;
|
mcuReg[i] = FUNCTION_SWTICH0;
|
||||||
mcuData[i++] = temp;
|
mcuData[i++] = temp;
|
||||||
|
|
||||||
if(SysGetFlag(TimelapseSwitch))
|
if(SysGetFlag(TimelapseSwitch))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
; Source Insight Project File List
|
; Source Insight Project File List
|
||||||
; Project Name: 6.8CS_NTK
|
; Project Name: na51089_linux_sdk
|
||||||
; Generated by Source Insight 4.00.0107 at 2023/3/13 17:03:41
|
; Generated by Source Insight 4.00.0107 at 2023/3/28 16:08:21
|
||||||
; Version=4.00.0107
|
; Version=4.00.0107
|
||||||
;
|
;
|
||||||
; Each line should contain either a file name, a wildcard, or a sub-directory name.
|
; Each line should contain either a file name, a wildcard, or a sub-directory name.
|
||||||
|
@ -9,17 +9,17 @@
|
||||||
application\external\Makefile
|
application\external\Makefile
|
||||||
application\Makefile
|
application\Makefile
|
||||||
application\source\cardv\Makefile
|
application\source\cardv\Makefile
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxCfg.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxCfg.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxCfg.h
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxCfg.h
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxDisplay_LCD.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxDisplay_LCD.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxInput_Key.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxInput_Key.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxPower_Battery.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxPower_Battery.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxPower_DC.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxPower_DC.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxStorage_Card.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxStorage_Card.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxStorage_EmbMem.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxStorage_EmbMem.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxUsb.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxUsb.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\IOCfg.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\IOCfg.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\IOCfg.h
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\IOCfg.h
|
||||||
application\source\cardv\SrcCode\Dx\DxCommon.c
|
application\source\cardv\SrcCode\Dx\DxCommon.c
|
||||||
application\source\cardv\SrcCode\Dx\DxVer.c
|
application\source\cardv\SrcCode\Dx\DxVer.c
|
||||||
application\source\cardv\SrcCode\Dx\include\DrvExt.h
|
application\source\cardv\SrcCode\Dx\include\DrvExt.h
|
||||||
|
@ -191,6 +191,8 @@ application\source\cardv\SrcCode\NVTUserCommand.h
|
||||||
application\source\cardv\SrcCode\PrjCfg.h
|
application\source\cardv\SrcCode\PrjCfg.h
|
||||||
application\source\cardv\SrcCode\PrjCfg_Default.h
|
application\source\cardv\SrcCode\PrjCfg_Default.h
|
||||||
application\source\cardv\SrcCode\PrjCfg_HUNTING.h
|
application\source\cardv\SrcCode\PrjCfg_HUNTING.h
|
||||||
|
application\source\cardv\SrcCode\PrjCfg_HUNTING_68CS.h
|
||||||
|
application\source\cardv\SrcCode\PrjCfg_HUNTING_S530.h
|
||||||
application\source\cardv\SrcCode\PrjInc.h
|
application\source\cardv\SrcCode\PrjInc.h
|
||||||
application\source\cardv\SrcCode\ProjectInfo.h
|
application\source\cardv\SrcCode\ProjectInfo.h
|
||||||
application\source\cardv\SrcCode\Startup\bin_info.c
|
application\source\cardv\SrcCode\Startup\bin_info.c
|
||||||
|
@ -4631,7 +4633,6 @@ lib\include\PStore.h
|
||||||
lib\include\QRCode\QR_Encode.h
|
lib\include\QRCode\QR_Encode.h
|
||||||
lib\include\rtosfdt.h
|
lib\include\rtosfdt.h
|
||||||
lib\include\sdio.h
|
lib\include\sdio.h
|
||||||
lib\include\sf_mcu.h
|
|
||||||
lib\include\SizeConvert.h
|
lib\include\SizeConvert.h
|
||||||
lib\include\strg_def.h
|
lib\include\strg_def.h
|
||||||
lib\include\sw_md.h
|
lib\include\sw_md.h
|
||||||
|
@ -5003,6 +5004,7 @@ lib\source\PStore\Makefile
|
||||||
lib\source\QRCode\Makefile
|
lib\source\QRCode\Makefile
|
||||||
lib\source\sifar\code\include\sf_battery.h
|
lib\source\sifar\code\include\sf_battery.h
|
||||||
lib\source\sifar\code\include\sf_common.h
|
lib\source\sifar\code\include\sf_common.h
|
||||||
|
lib\source\sifar\code\include\sf_commu_mcu.h
|
||||||
lib\source\sifar\code\include\sf_dbg.h
|
lib\source\sifar\code\include\sf_dbg.h
|
||||||
lib\source\sifar\code\include\sf_gps.h
|
lib\source\sifar\code\include\sf_gps.h
|
||||||
lib\source\sifar\code\include\sf_http.h
|
lib\source\sifar\code\include\sf_http.h
|
||||||
|
@ -5019,6 +5021,7 @@ lib\source\sifar\code\source\common\sf_led.c
|
||||||
lib\source\sifar\code\source\common\sf_pc_tool.c
|
lib\source\sifar\code\source\common\sf_pc_tool.c
|
||||||
lib\source\sifar\code\source\common\sf_sd_common.c
|
lib\source\sifar\code\source\common\sf_sd_common.c
|
||||||
lib\source\sifar\code\source\debug\sf_dbg.c
|
lib\source\sifar\code\source\debug\sf_dbg.c
|
||||||
|
lib\source\sifar\code\source\mcu\sf_commu_mcu.c
|
||||||
lib\source\sifar\code\source\mcu\sf_mcu_client.c
|
lib\source\sifar\code\source\mcu\sf_mcu_client.c
|
||||||
lib\source\sifar\code\source\module\sf_4G_auto_operation.c
|
lib\source\sifar\code\source\module\sf_4G_auto_operation.c
|
||||||
lib\source\sifar\code\source\module\sf_4G_usb_uart.c
|
lib\source\sifar\code\source\module\sf_4G_usb_uart.c
|
||||||
|
|
BIN
configs/Linux/cfg_565_HUNTING_EVB_LINUX_4G_S530/nvt-evb.dtb
Normal file
BIN
configs/Linux/cfg_565_HUNTING_EVB_LINUX_4G_S530/nvt-evb.dtb
Normal file
Binary file not shown.
1181
configs/Linux/cfg_565_HUNTING_EVB_LINUX_4G_S530/nvt-evb.tmp.dts
Normal file
1181
configs/Linux/cfg_565_HUNTING_EVB_LINUX_4G_S530/nvt-evb.tmp.dts
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@
|
||||||
mipi_lvds{pinmux = <0x0>;};
|
mipi_lvds{pinmux = <0x0>;};
|
||||||
i2c{pinmux = <0x40>;};
|
i2c{pinmux = <0x40>;};
|
||||||
sif{pinmux = <0x0>;};
|
sif{pinmux = <0x0>;};
|
||||||
uart{pinmux = <0x1>;};
|
uart{pinmux = <0x1021>;};
|
||||||
spi{pinmux = <0x0>;};
|
spi{pinmux = <0x0>;};
|
||||||
sdp{pinmux = <0x0>;};
|
sdp{pinmux = <0x0>;};
|
||||||
remote{pinmux = <0x0>;};
|
remote{pinmux = <0x0>;};
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
mipi_lvds{pinmux = <0x0>;};
|
mipi_lvds{pinmux = <0x0>;};
|
||||||
i2c{pinmux = <0x40>;};
|
i2c{pinmux = <0x40>;};
|
||||||
sif{pinmux = <0x0>;};
|
sif{pinmux = <0x0>;};
|
||||||
uart{pinmux = <0x1>;};
|
uart{pinmux = <0x1021>;};
|
||||||
spi{pinmux = <0x0>;};
|
spi{pinmux = <0x0>;};
|
||||||
sdp{pinmux = <0x0>;};
|
sdp{pinmux = <0x0>;};
|
||||||
remote{pinmux = <0x0>;};
|
remote{pinmux = <0x0>;};
|
||||||
|
|
Binary file not shown.
|
@ -134,7 +134,7 @@ void DrvGPIO_SetPhotoMovieModeFromMonitor(UINT32 u32PhotoMovieMode)
|
||||||
UINT32 DrvGPIO_GetPhotoMovieModeFromMonitor(void)
|
UINT32 DrvGPIO_GetPhotoMovieModeFromMonitor(void)
|
||||||
{
|
{
|
||||||
static BOOL first_entry = TRUE;
|
static BOOL first_entry = TRUE;
|
||||||
|
int ret = 1;
|
||||||
UINT8 value;
|
UINT8 value;
|
||||||
|
|
||||||
if(first_entry == TRUE){
|
if(first_entry == TRUE){
|
||||||
|
@ -147,8 +147,8 @@ UINT32 DrvGPIO_GetPhotoMovieModeFromMonitor(void)
|
||||||
g_uiBootMode = DX_HUNTING_MODE_OTHER;
|
g_uiBootMode = DX_HUNTING_MODE_OTHER;
|
||||||
return g_uiBootMode;
|
return g_uiBootMode;
|
||||||
}
|
}
|
||||||
sf_mod_init();
|
ret = sf_mod_init();
|
||||||
|
printf("%s:%d ret:%d\n", __FUNCTION__, __LINE__,ret);
|
||||||
value = sf_get_power_on_mode();
|
value = sf_get_power_on_mode();
|
||||||
sf_mcu_wdg_set(5);
|
sf_mcu_wdg_set(5);
|
||||||
|
|
||||||
|
|
|
@ -338,7 +338,7 @@ extern BOOL GPIOMap_DetPoweroff(void);
|
||||||
#define GPIO_CHARGEIC_STATE P_GPIO_12
|
#define GPIO_CHARGEIC_STATE P_GPIO_12
|
||||||
#define GPIO_CHARGEIC_ADC_SWITCH L_GPIO_0
|
#define GPIO_CHARGEIC_ADC_SWITCH L_GPIO_0
|
||||||
|
|
||||||
#define GPIO_ACC P_GPIO_5
|
//#define GPIO_ACC P_GPIO_5
|
||||||
#define GPIO_PA P_GPIO_0
|
#define GPIO_PA P_GPIO_0
|
||||||
#define GPIO_PARKING P_GPIO_6
|
#define GPIO_PARKING P_GPIO_6
|
||||||
|
|
||||||
|
|
|
@ -944,8 +944,8 @@
|
||||||
#define POWERON_FAST_SLICE_ENC_VER2 ENABLE
|
#define POWERON_FAST_SLICE_ENC_VER2 ENABLE
|
||||||
#define DZOOM_FUNC ENABLE
|
#define DZOOM_FUNC ENABLE
|
||||||
#define MOVIE_AI_DEMO DISABLE
|
#define MOVIE_AI_DEMO DISABLE
|
||||||
#define HUNTING_MCU_I2C ENABLE
|
#define HUNTING_MCU_I2C DISABLE
|
||||||
#define HUNTING_MCU_UART DISABLE
|
#define HUNTING_MCU_UART ENABLE
|
||||||
#define HUNTING_IR_LED_940 ENABLE//DISABLE
|
#define HUNTING_IR_LED_940 ENABLE//DISABLE
|
||||||
#define SF_BASE_VERSION "7MD4RCwD3T1"
|
#define SF_BASE_VERSION "7MD4RCwD3T1"
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define __DBGLVL__ ((THIS_DBGLVL>=PRJ_DBG_LVL)?THIS_DBGLVL:PRJ_DBG_LVL)
|
#define __DBGLVL__ ((THIS_DBGLVL>=PRJ_DBG_LVL)?THIS_DBGLVL:PRJ_DBG_LVL)
|
||||||
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
||||||
#include <kwrap/debug.h>
|
#include <kwrap/debug.h>
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
#include <sf_mcu.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void System_BootStart(void);
|
extern void System_BootStart(void);
|
||||||
extern void System_BootEnd(void);
|
extern void System_BootEnd(void);
|
||||||
|
@ -710,7 +713,10 @@ exit:
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
UserMainProc_Exit();
|
UserMainProc_Exit();
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
System_PowerOffStart();
|
//System_PowerOffStart();
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
sf_mcu_reg_set(SF_MCU_POWEROFF,paramArray[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,13 @@
|
||||||
extern "C"{
|
extern "C"{
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#include <sf_mcu.h>
|
||||||
|
|
||||||
#define SERIAL_DEVICE_PATH "/dev/ttyS2"
|
#define SERIAL_DEVICE_PATH "/dev/ttyS2"
|
||||||
|
#define BUF_REG_SIZE (REG_SIZE*2+8)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char buf[32];
|
unsigned char buf[BUF_REG_SIZE];
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
}SMAPBUF_t;
|
}SMAPBUF_t;
|
||||||
/*
|
/*
|
||||||
|
@ -60,9 +62,14 @@ int sf_commu_get_mcu(unsigned char reg);
|
||||||
int sf_getRegFromMcu_depack(unsigned char * dataToParse, unsigned int datalen, unsigned char * regAddr, unsigned char * regVal);
|
int sf_getRegFromMcu_depack(unsigned char * dataToParse, unsigned int datalen, unsigned char * regAddr, unsigned char * regVal);
|
||||||
int sf_getRegFromMcu_ack(unsigned char regAddr, unsigned char regVal);
|
int sf_getRegFromMcu_ack(unsigned char regAddr, unsigned char regVal);
|
||||||
unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len);
|
unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len);
|
||||||
void sf_commu_mcu_task_start(void);
|
int sf_commu_mcu_task_start(void);
|
||||||
void sf_commu_mcu_task_stop(void);
|
void sf_commu_mcu_task_stop(void);
|
||||||
unsigned char sf_commu_mcu_task_running(void);
|
unsigned char sf_commu_mcu_task_running(void);
|
||||||
|
unsigned int sf_get_mcu_reg_ack_depack_many(unsigned char reg[], unsigned char val[], unsigned int * num);
|
||||||
|
int sf_set_mcu_reg_many(unsigned char reg[], unsigned char val[], unsigned int num);
|
||||||
|
int sf_get_mcu_reg_many(unsigned char reg[], unsigned int num);
|
||||||
|
int sf_commu_set_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num);
|
||||||
|
int sf_commu_get_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
#define WDT_OFF 0x01
|
#define WDT_OFF 0x01
|
||||||
#define DEBUG_MODE_ON 0x02
|
#define DEBUG_MODE_ON 0x02
|
||||||
|
|
||||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
#if 0//defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
#define REG_SIZE 82
|
#define REG_SIZE 82
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -223,7 +223,7 @@ typedef enum
|
||||||
RESERVER13,
|
RESERVER13,
|
||||||
RESERVER14,
|
RESERVER14,
|
||||||
}PARA_REG;
|
}PARA_REG;
|
||||||
|
#endif
|
||||||
typedef enum {
|
typedef enum {
|
||||||
POWEROFF_COUNTDOWN = 1,
|
POWEROFF_COUNTDOWN = 1,
|
||||||
POWEROFF_PVDOWN,
|
POWEROFF_PVDOWN,
|
||||||
|
@ -251,8 +251,8 @@ typedef enum {
|
||||||
WORKING_TIME_ALL = 0xff,
|
WORKING_TIME_ALL = 0xff,
|
||||||
}WORKING_TIME_TYPE;
|
}WORKING_TIME_TYPE;
|
||||||
|
|
||||||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
//#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||||
|
#if 1
|
||||||
#define REG_SIZE 91
|
#define REG_SIZE 91
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -361,8 +361,6 @@ typedef enum
|
||||||
RESERVER12 = 89,
|
RESERVER12 = 89,
|
||||||
RESERVER13 = 90,
|
RESERVER13 = 90,
|
||||||
}PARA_REG;
|
}PARA_REG;
|
||||||
#else
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,10 @@
|
||||||
#include "GxUSB.h"
|
#include "GxUSB.h"
|
||||||
#include "kwrap/task.h"
|
#include "kwrap/task.h"
|
||||||
#include <uart.h>
|
#include <uart.h>
|
||||||
|
#include "NvtUser/NvtUser.h"
|
||||||
|
#include "AppControl/AppControl.h"
|
||||||
|
|
||||||
#include "sf_commu_mcu.h"
|
#include <sf_commu_mcu.h>
|
||||||
|
|
||||||
#define SERIAL_DEVICE_PATH "/dev/ttyS2"
|
#define SERIAL_DEVICE_PATH "/dev/ttyS2"
|
||||||
|
|
||||||
|
@ -58,6 +60,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned char mcu_upgrade_buf[32];
|
unsigned char mcu_upgrade_buf[32];
|
||||||
unsigned char mcu_upgrade_buf_len;
|
unsigned char mcu_upgrade_buf_len;
|
||||||
|
|
||||||
|
@ -120,7 +123,7 @@ static unsigned short sf_crc16_check(unsigned char * dataIn, int length)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char sndBuf[32] =
|
static unsigned char sndBuf[BUF_REG_SIZE] =
|
||||||
{
|
{
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
@ -132,8 +135,10 @@ SMAPBUF_t smap_buf =
|
||||||
|
|
||||||
int SMAP_waitAck = 0;
|
int SMAP_waitAck = 0;
|
||||||
|
|
||||||
unsigned char mcu_buf[32] = {0};
|
unsigned char mcu_buf[BUF_REG_SIZE] = {0};
|
||||||
unsigned int mcu_buf_len = 0;
|
unsigned int mcu_buf_len = 0;
|
||||||
|
unsigned char cmpRegBuf[BUF_REG_SIZE] = {0};
|
||||||
|
unsigned char cmpValBuf[BUF_REG_SIZE] = {0};
|
||||||
|
|
||||||
static unsigned char sf_commu_mcu_exit = 1;
|
static unsigned char sf_commu_mcu_exit = 1;
|
||||||
static VK_TASK_HANDLE sfCommuMcuThread = 0;
|
static VK_TASK_HANDLE sfCommuMcuThread = 0;
|
||||||
|
@ -150,10 +155,12 @@ void mcubuf_reset(void)
|
||||||
int sf_commu_write(unsigned char * buf, int len)
|
int sf_commu_write(unsigned char * buf, int len)
|
||||||
{
|
{
|
||||||
int ret = FAIL;
|
int ret = FAIL;
|
||||||
|
|
||||||
ret = uart3_write(buf, len);
|
ret = uart3_write(buf, len);
|
||||||
if(ret < 0)
|
|
||||||
|
// vos_flag_set(FLG_ID_UART3, UART3_FLAG_DATAVALID);
|
||||||
|
if(ret <= 0)
|
||||||
{
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -162,10 +169,25 @@ int sf_commu_write(unsigned char * buf, int len)
|
||||||
|
|
||||||
int sf_commu_read(unsigned char * buf, int len)
|
int sf_commu_read(unsigned char * buf, int len)
|
||||||
{
|
{
|
||||||
int ret = SUCCESS;
|
INT32 ret = 0;
|
||||||
ret = uart3_read(buf, len);
|
//int j = 0;
|
||||||
|
/*
|
||||||
|
UART_DATA_PARA DataPara;
|
||||||
|
DataPara.Action = UART_ACT_GET;
|
||||||
|
DataPara.BufferInfo.uiSize = len;
|
||||||
|
DataPara.BufferInfo.pBuffer = buf;
|
||||||
|
ret = uart3_operateData(&DataPara);
|
||||||
|
*/
|
||||||
|
//uart3_waitData(UART_ACT_GET);
|
||||||
|
//printf("%s:%d s\r\n", __FUNCTION__, __LINE__);
|
||||||
|
|
||||||
|
ret = (INT32)uart3_read(buf, len);
|
||||||
|
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
return FAIL;
|
{
|
||||||
|
printf("%s:%d error ret:%lu\r\n", __FUNCTION__, __LINE__,ret);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -244,6 +266,97 @@ int sf_get_mcu_reg(unsigned char reg)
|
||||||
return 0x01;
|
return 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sf_set_mcu_reg_many(unsigned char reg[], unsigned char val[], unsigned int num)
|
||||||
|
{
|
||||||
|
unsigned short index = 0;
|
||||||
|
unsigned short crc = 0;
|
||||||
|
unsigned short crc_start = 0;
|
||||||
|
unsigned short crc_end = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
int ret = FAIL;
|
||||||
|
memset(sndBuf, 0x00, sizeof(sndBuf));
|
||||||
|
// uint8_t i = 0;
|
||||||
|
sndBuf[index] = 0x55;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xAA;
|
||||||
|
index++;
|
||||||
|
crc_start = index;
|
||||||
|
sndBuf[index] = 0x04;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = num;
|
||||||
|
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = reg[i];
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = val[i];
|
||||||
|
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
crc_end = index;
|
||||||
|
crc = sf_crc16_check(&sndBuf[crc_start], crc_end - crc_start);
|
||||||
|
sndBuf[index] = (crc & 0xff00) >> 8;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = crc & 0x00ff;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xFF;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xEE;
|
||||||
|
ret = sf_commu_write(sndBuf, index + 1);
|
||||||
|
if(ret == FAIL)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
}
|
||||||
|
return 0x03;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sf_get_mcu_reg_many(unsigned char reg[], unsigned int num)
|
||||||
|
{
|
||||||
|
unsigned short index = 0;
|
||||||
|
unsigned short crc = 0;
|
||||||
|
unsigned short crc_start = 0;
|
||||||
|
unsigned short crc_end = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
int ret = FAIL;
|
||||||
|
//uint8_t i = 0;
|
||||||
|
memset(sndBuf, 0x00, sizeof(sndBuf));
|
||||||
|
sndBuf[index] = 0x55;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xAA;
|
||||||
|
index++;
|
||||||
|
crc_start = index;
|
||||||
|
sndBuf[index] = 0x02;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = num;
|
||||||
|
|
||||||
|
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = reg[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
index++;
|
||||||
|
crc_end = index;
|
||||||
|
crc = sf_crc16_check(&sndBuf[crc_start], crc_end - crc_start);
|
||||||
|
sndBuf[index] = (crc & 0xff00) >> 8;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = crc & 0x00ff;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xFF;
|
||||||
|
index++;
|
||||||
|
sndBuf[index] = 0xEE;
|
||||||
|
|
||||||
|
ret = sf_commu_write(sndBuf, index + 1);
|
||||||
|
if(ret == FAIL)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int sf_set_mcu_reg_ack_depack(unsigned int * address, unsigned int * value)
|
unsigned int sf_set_mcu_reg_ack_depack(unsigned int * address, unsigned int * value)
|
||||||
{
|
{
|
||||||
unsigned short crc1 = (((unsigned short) smap_buf.buf[smap_buf.index - 4]) << 8) | smap_buf.buf[smap_buf.index - 3];
|
unsigned short crc1 = (((unsigned short) smap_buf.buf[smap_buf.index - 4]) << 8) | smap_buf.buf[smap_buf.index - 3];
|
||||||
|
@ -295,6 +408,42 @@ unsigned int sf_get_mcu_reg_ack_depack(unsigned int * address, unsigned int * va
|
||||||
return (unsigned int)smap_buf.buf[2];
|
return (unsigned int)smap_buf.buf[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int sf_get_mcu_reg_ack_depack_many(unsigned char reg[], unsigned char val[], unsigned int * num)
|
||||||
|
{
|
||||||
|
unsigned short crc1 = (((unsigned short) smap_buf.buf[smap_buf.index - 4] << 8) & 0xff00) | smap_buf.buf[smap_buf.index - 3];
|
||||||
|
unsigned short crc2 = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
unsigned int j = 4;
|
||||||
|
|
||||||
|
crc2 = sf_crc16_check(&smap_buf.buf[2], smap_buf.index - 6);
|
||||||
|
|
||||||
|
if (crc2 != crc1)
|
||||||
|
{
|
||||||
|
printf("crc error crc1 %d, crc2 %d, function %s, file %s, line %d\r\n", crc1, crc2, __FUNCTION__,
|
||||||
|
__FILE__, __LINE__);
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
*num = smap_buf.buf[3];
|
||||||
|
|
||||||
|
for(i = 0; i < *num; i++)
|
||||||
|
{
|
||||||
|
reg[i]= smap_buf.buf[j];
|
||||||
|
j++;
|
||||||
|
val[i]= smap_buf.buf[j];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (smap_buf.buf[2] == 0xFF) /* error command 0xff */
|
||||||
|
{
|
||||||
|
printf("%s:%d command error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (unsigned int)smap_buf.buf[2];
|
||||||
|
}
|
||||||
|
|
||||||
int sf_commu_wait(unsigned char cmd)
|
int sf_commu_wait(unsigned char cmd)
|
||||||
{
|
{
|
||||||
volatile char trytimes = 0;
|
volatile char trytimes = 0;
|
||||||
|
@ -315,7 +464,9 @@ void sf_commu_reset(void)
|
||||||
{
|
{
|
||||||
smap_buf.index = 0;
|
smap_buf.index = 0;
|
||||||
SMAP_waitAck = 0;
|
SMAP_waitAck = 0;
|
||||||
memset(smap_buf.buf, 0x00, 32);
|
memset(smap_buf.buf, 0x00, sizeof(smap_buf.buf));
|
||||||
|
memset(cmpRegBuf, 0x00, sizeof(cmpRegBuf));
|
||||||
|
memset(cmpValBuf, 0x00, sizeof(cmpValBuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
int sf_commu_set_mcu(unsigned char reg, unsigned char val)
|
int sf_commu_set_mcu(unsigned char reg, unsigned char val)
|
||||||
|
@ -323,7 +474,7 @@ int sf_commu_set_mcu(unsigned char reg, unsigned char val)
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
unsigned int address = 0;
|
unsigned int address = 0;
|
||||||
unsigned int value = 0;
|
unsigned int value = 0;
|
||||||
printf("Reg_Data[%02d,0x%02x]\n", reg,val);
|
//printf("W_addr[%02d,0x%02x]\n", reg,val);
|
||||||
sf_commu_reset();
|
sf_commu_reset();
|
||||||
sf_set_mcu_reg(reg, val);
|
sf_set_mcu_reg(reg, val);
|
||||||
ret = sf_commu_wait(0x03);
|
ret = sf_commu_wait(0x03);
|
||||||
|
@ -355,13 +506,14 @@ int sf_commu_get_mcu(unsigned char reg)
|
||||||
|
|
||||||
sf_commu_reset();
|
sf_commu_reset();
|
||||||
sf_get_mcu_reg(reg);
|
sf_get_mcu_reg(reg);
|
||||||
ret = sf_commu_wait(0x01);
|
ret = sf_commu_wait(0x01);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
{
|
{
|
||||||
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
||||||
sf_commu_reset();
|
sf_commu_reset();
|
||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sf_get_mcu_reg_ack_depack(&address, &value);
|
ret = sf_get_mcu_reg_ack_depack(&address, &value);
|
||||||
if (ret < 0 || address != reg)
|
if (ret < 0 || address != reg)
|
||||||
{
|
{
|
||||||
|
@ -375,6 +527,79 @@ int sf_commu_get_mcu(unsigned char reg)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
int sf_commu_set_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num)
|
||||||
|
{
|
||||||
|
int ret = -1;
|
||||||
|
//unsigned int address = 0;
|
||||||
|
//unsigned int value = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
//printf("W_addr[%02d,0x%02x]\n", reg,val);
|
||||||
|
sf_commu_reset();
|
||||||
|
sf_set_mcu_reg_many(reg, val, *num);
|
||||||
|
ret = sf_commu_wait(0x04);
|
||||||
|
if(ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
||||||
|
sf_commu_reset();
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = sf_get_mcu_reg_ack_depack_many(cmpRegBuf, cmpValBuf, num);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(i = 0; i < *num; i++)
|
||||||
|
{
|
||||||
|
if((reg[i] != cmpRegBuf[i]) || (val[i] != cmpValBuf[i]))
|
||||||
|
{
|
||||||
|
printf("%s:%d error address %d, value %d get address %d, value %d\r\n", __FUNCTION__, __LINE__, reg[i], val[i], cmpRegBuf[i], cmpValBuf[i]);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sf_commu_get_mcu_many(unsigned char reg[], unsigned char val[], unsigned int *num)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
unsigned int i = 0;
|
||||||
|
|
||||||
|
sf_commu_reset();
|
||||||
|
sf_get_mcu_reg_many(reg,*num);
|
||||||
|
ret = sf_commu_wait(0x02);
|
||||||
|
if(ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d time out\r\n", __FUNCTION__, __LINE__);
|
||||||
|
sf_commu_reset();
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = sf_get_mcu_reg_ack_depack_many(cmpRegBuf, val, num);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(i = 0; i < *num; i++)
|
||||||
|
{
|
||||||
|
if(reg[i] != cmpRegBuf[i])
|
||||||
|
{
|
||||||
|
printf("%s:%d error\r\n", __FUNCTION__, __LINE__);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
int sf_getRegFromMcu_depack(unsigned char * dataToParse, unsigned int datalen, unsigned char * regAddr, unsigned char * regVal)
|
int sf_getRegFromMcu_depack(unsigned char * dataToParse, unsigned int datalen, unsigned char * regAddr, unsigned char * regVal)
|
||||||
{
|
{
|
||||||
|
@ -457,6 +682,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
|
||||||
//stMessageBuf.arg2 = SF_KEY_PIN_DATAREADY;
|
//stMessageBuf.arg2 = SF_KEY_PIN_DATAREADY;
|
||||||
//sf_com_message_send_to_app(&stMessageBuf);
|
//sf_com_message_send_to_app(&stMessageBuf);
|
||||||
ret = 0x05;
|
ret = 0x05;
|
||||||
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -488,7 +714,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
|
||||||
THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
||||||
{
|
{
|
||||||
THREAD_ENTRY();
|
THREAD_ENTRY();
|
||||||
static unsigned char buffer[32] = {0};
|
static unsigned char buffer[BUF_REG_SIZE] = {0};
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int readLen = 0;
|
int readLen = 0;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
@ -501,24 +727,18 @@ THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
||||||
unsigned char copy_size = 0;
|
unsigned char copy_size = 0;
|
||||||
//sf_commu_mcu_interface_init(115200, 'N', 8, 1, 'N');
|
//sf_commu_mcu_interface_init(115200, 'N', 8, 1, 'N');
|
||||||
//sf_commu_mcu_open();
|
//sf_commu_mcu_open();
|
||||||
int rt = 0;
|
//FLGPTN FlgPtn;
|
||||||
static int InitFlag = 1;
|
|
||||||
|
|
||||||
if(InitFlag)
|
|
||||||
{
|
|
||||||
InitFlag = 0;
|
|
||||||
rt = sf_init_mcu();
|
|
||||||
printf("%s:%d %d\r\n", __FUNCTION__, __LINE__,rt);
|
|
||||||
}
|
|
||||||
mcubuf_reset();
|
mcubuf_reset();
|
||||||
CHKPNT;
|
CHKPNT;
|
||||||
while(sf_commu_mcu_exit == 0)
|
while(sf_commu_mcu_exit == 0)
|
||||||
{
|
{
|
||||||
readLen = sf_commu_read(buffer + len, 32);
|
readLen = sf_commu_read(buffer + len, 1);
|
||||||
|
|
||||||
if(readLen > 0)
|
if(readLen > 0)
|
||||||
{
|
{
|
||||||
len += readLen;
|
len += readLen;
|
||||||
|
//printf("%s:%d len = %d readLen = %d\n",__FUNCTION__,__LINE__, len, readLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(i < len)
|
while(i < len)
|
||||||
|
@ -585,6 +805,7 @@ THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
||||||
memcpy(smap_buf.buf + smap_buf.index, &buffer[start], copy_size);
|
memcpy(smap_buf.buf + smap_buf.index, &buffer[start], copy_size);
|
||||||
smap_buf.index += copy_size; //index从0开始
|
smap_buf.index += copy_size; //index从0开始
|
||||||
SMAP_waitAck = 1;
|
SMAP_waitAck = 1;
|
||||||
|
//printf("%s:%d SMAP_waitAck 1\n", __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -610,36 +831,50 @@ THREAD_RETTYPE sf_commu_mcu_task(void *arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vos_util_delay_us(10000);//10ms
|
|
||||||
}
|
}
|
||||||
THREAD_RETURN(0);
|
THREAD_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void sf_commu_mcu_task_start(void)
|
int sf_commu_mcu_task_start(void)
|
||||||
{
|
{
|
||||||
printf("%s:%d s\r\n", __FUNCTION__, __LINE__);
|
printf("%s:%d s\r\n", __FUNCTION__, __LINE__);
|
||||||
if(sf_commu_mcu_exit == 1)
|
if(sf_commu_mcu_exit == 1)
|
||||||
{
|
{
|
||||||
sfCommuMcuThread = vos_task_create(sf_commu_mcu_task, NULL, "sf_commu_mcu_task", 18, 2048);
|
sf_commu_mcu_exit = 0;
|
||||||
|
int rt = 0;
|
||||||
|
static int InitFlag = 1;
|
||||||
|
//T_CFLG cflg ;
|
||||||
|
|
||||||
|
if(InitFlag)
|
||||||
|
{
|
||||||
|
//vos_flag_create(&FLG_ID_UART3, &cflg, "SF UART receive FLG");
|
||||||
|
//vos_flag_clr(FLG_ID_UART3, UART3_FLAG_ALL);
|
||||||
|
InitFlag = 0;
|
||||||
|
rt = sf_init_mcu();
|
||||||
|
printf("%s:%d %d\r\n", __FUNCTION__, __LINE__,rt);
|
||||||
|
|
||||||
|
}
|
||||||
|
sfCommuMcuThread = vos_task_create(sf_commu_mcu_task, NULL, "sf_commu_mcu_task", 10, 4096);
|
||||||
if(!sfCommuMcuThread)
|
if(!sfCommuMcuThread)
|
||||||
{
|
{
|
||||||
DBG_ERR("[ERROR] sf_commu_mcu_task thread creat failed!\r\n");
|
DBG_ERR("[ERROR] sf_commu_mcu_task thread creat failed!\r\n");
|
||||||
return ;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vos_task_resume(sfCommuMcuThread);
|
vos_task_resume(sfCommuMcuThread);
|
||||||
}
|
}
|
||||||
sf_commu_mcu_exit = 0;
|
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void sf_commu_mcu_task_stop(void)
|
void sf_commu_mcu_task_stop(void)
|
||||||
{
|
{
|
||||||
sf_commu_mcu_exit = 1;
|
sf_commu_mcu_exit = 1;
|
||||||
|
//vos_flag_destroy(FLG_ID_UART3);
|
||||||
vos_task_destroy(sfCommuMcuThread);
|
vos_task_destroy(sfCommuMcuThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,10 +55,10 @@ static UINT32 simCardInsert=0;
|
||||||
static UINT8 gModuleSleep = 1;
|
static UINT8 gModuleSleep = 1;
|
||||||
static UINT32 SmsCheck = 0;
|
static UINT32 SmsCheck = 0;
|
||||||
static SF_CAMERA_CMD_S CameraCmd = {0};
|
static SF_CAMERA_CMD_S CameraCmd = {0};
|
||||||
|
static UINT8 McuProductInfo = 0;
|
||||||
|
|
||||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||||
static UINT8 drNoResetTimeSync = FALSE; //0:reset; 1:no reset;
|
static UINT8 drNoResetTimeSync = FALSE; //0:reset; 1:no reset;
|
||||||
static UINT8 McuProductInfo = 0;
|
|
||||||
|
|
||||||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
static UINT8 isSignalReady = 0;
|
static UINT8 isSignalReady = 0;
|
||||||
|
@ -180,81 +180,6 @@ int sf_init_mcu(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
UINT8 sf_mcu_read(UINT32 reg, UINT8 *data)
|
|
||||||
{
|
|
||||||
UINT8 data2 = 0;
|
|
||||||
|
|
||||||
*data = sf_commu_get_mcu(reg);
|
|
||||||
//vos_util_delay_us(30);
|
|
||||||
|
|
||||||
data2 = sf_commu_get_mcu(reg);
|
|
||||||
printf("R_addr[%lu]=0x%02x\n", reg, data2);
|
|
||||||
|
|
||||||
if(*data != data2)
|
|
||||||
{
|
|
||||||
printf("%s:%d ERROR\n", __FUNCTION__, __LINE__);
|
|
||||||
printf("[ERROR]-[sf_i2c_read]reg:%lu,data:%d,data2:%d\n", reg, *data, data2);
|
|
||||||
vos_util_delay_us(300);
|
|
||||||
*data = sf_commu_get_mcu(reg);
|
|
||||||
printf("[ERROR]-[sf_i2c_read]reg:%lu,data3:%d,data2:%d\n", reg, *data, data2);
|
|
||||||
}
|
|
||||||
|
|
||||||
//vos_util_delay_us(200);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT8 sf_mcu_write(UINT32 reg, UINT32 data)
|
|
||||||
{
|
|
||||||
UINT8 data2 = 0;
|
|
||||||
|
|
||||||
sf_commu_set_mcu(reg, data);
|
|
||||||
//vos_util_delay_us(20);
|
|
||||||
|
|
||||||
data2 = sf_commu_get_mcu(reg);
|
|
||||||
printf("W_addr[%lu]=0x%02x\n", reg, data2);
|
|
||||||
|
|
||||||
if(data != data2)
|
|
||||||
{
|
|
||||||
printf("%s:%d ERROR reg:%lu,data:%lu,data2:%d\n", __FUNCTION__, __LINE__, reg, data, data2);
|
|
||||||
vos_util_delay_us(300);
|
|
||||||
sf_commu_set_mcu(reg, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
//vos_util_delay_us(200);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int sf_init_mcu(void)
|
|
||||||
{
|
|
||||||
CHKPNT;
|
|
||||||
ER ret = 0;
|
|
||||||
UART_INIT_PARA UartParaBasic;
|
|
||||||
UartParaBasic.BaudRate = UART_BAUDRATE_115200;
|
|
||||||
UartParaBasic.BaudRate = 115200;
|
|
||||||
UartParaBasic.Length = UART_LEN_L8_S1;
|
|
||||||
UartParaBasic.Parity = UART_PARITY_NONE;
|
|
||||||
UartParaBasic.FlowCtrlMode = UART_FC_MODE_NONE;
|
|
||||||
UartParaBasic.DataTransMode = UART_DATA_TRANS_PIO;
|
|
||||||
ret = uart3_open();
|
|
||||||
uart3_initHW(&UartParaBasic);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int sf_off_mcu(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
#if HUNTING_MCU_I2C != ENABLE
|
|
||||||
uart3_close();
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
{
|
{
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
|
@ -266,19 +191,6 @@ UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************
|
|
||||||
Function: sf_get_daily_report_start_mode
|
|
||||||
Description: get dailyreport start mode
|
|
||||||
Input: N/A
|
|
||||||
Output: N/A
|
|
||||||
Return: 0:ON mode 1:OFF mode
|
|
||||||
Others: N/A
|
|
||||||
*************************************************/
|
|
||||||
UINT8 sf_get_daily_report_start_mode(void)
|
|
||||||
{
|
|
||||||
return DailyReportStartMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
Function: sf_mcu_power_on_para_get
|
Function: sf_mcu_power_on_para_get
|
||||||
Description: read MCU register data to update uipara and variable.
|
Description: read MCU register data to update uipara and variable.
|
||||||
|
@ -302,7 +214,7 @@ UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId)
|
||||||
}
|
}
|
||||||
|
|
||||||
sf_mcu_read(MCU_SUB_VER, &McuSubVersion);
|
sf_mcu_read(MCU_SUB_VER, &McuSubVersion);
|
||||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
#if 0//defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
sf_mcu_read(MCU_VER, &mcuVer);
|
sf_mcu_read(MCU_VER, &mcuVer);
|
||||||
McuVersion = mcuVer;
|
McuVersion = mcuVer;
|
||||||
#else
|
#else
|
||||||
|
@ -345,6 +257,227 @@ UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId)
|
||||||
return startMode;
|
return startMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
UINT8 sf_mcu_read(UINT32 reg, UINT8 *data)
|
||||||
|
{
|
||||||
|
//UINT8 data2 = 0;
|
||||||
|
|
||||||
|
*data = sf_commu_get_mcu(reg);
|
||||||
|
//vos_util_delay_us(30);
|
||||||
|
|
||||||
|
//data2 = sf_commu_get_mcu(reg);
|
||||||
|
printf("R_addr[%lu]=0x%02x\n", reg, *data);
|
||||||
|
|
||||||
|
/*if(*data != data2)
|
||||||
|
{
|
||||||
|
printf("%s:%d ERROR\n", __FUNCTION__, __LINE__);
|
||||||
|
printf("[ERROR]-[sf_i2c_read]reg:%lu,data:%d,data2:%d\n", reg, *data, data2);
|
||||||
|
vos_util_delay_us(300);
|
||||||
|
*data = sf_commu_get_mcu(reg);
|
||||||
|
printf("[ERROR]-[sf_i2c_read]reg:%lu,data3:%d,data2:%d\n", reg, *data, data2);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//vos_util_delay_us(200);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 sf_mcu_write(UINT32 reg, UINT32 data)
|
||||||
|
{
|
||||||
|
//UINT8 data2 = 0;
|
||||||
|
|
||||||
|
sf_commu_set_mcu(reg, data);
|
||||||
|
//vos_util_delay_us(20);
|
||||||
|
printf("W_addr[%lu]=0x%lu\n", reg, data);
|
||||||
|
|
||||||
|
/*data2 = sf_commu_get_mcu(reg);
|
||||||
|
printf("W_addr[%lu]=0x%02x\n", reg, data2);
|
||||||
|
|
||||||
|
if(data != data2)
|
||||||
|
{
|
||||||
|
printf("%s:%d ERROR reg:%lu,data:%lu,data2:%d\n", __FUNCTION__, __LINE__, reg, data, data2);
|
||||||
|
vos_util_delay_us(300);
|
||||||
|
sf_commu_set_mcu(reg, data);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//vos_util_delay_us(200);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int sf_init_mcu(void)
|
||||||
|
{
|
||||||
|
CHKPNT;
|
||||||
|
ER ret = 0;
|
||||||
|
UART_INIT_PARA UartParaBasic;
|
||||||
|
UartParaBasic.BaudRate = UART_BAUDRATE_115200;
|
||||||
|
UartParaBasic.BaudRate = 115200;
|
||||||
|
UartParaBasic.Length = UART_LEN_L8_S1;
|
||||||
|
UartParaBasic.Parity = UART_PARITY_NONE;
|
||||||
|
UartParaBasic.FlowCtrlMode = UART_FC_MODE_NONE;
|
||||||
|
UartParaBasic.DataTransMode = UART_DATA_TRANS_PIO;
|
||||||
|
//uart3_setConfig(UART_CONFIG_ID_RX_TRIGGER_LEVEL,0x0);
|
||||||
|
ret = uart3_open();
|
||||||
|
uart3_initHW(&UartParaBasic);
|
||||||
|
uart3_setConfig(UART_CONFIG_ID_RX_TRIGGER_LEVEL,0x0);
|
||||||
|
|
||||||
|
/*UART_DATA_PARA DataPara;
|
||||||
|
DataPara.Action = UART_ACT_GET;
|
||||||
|
DataPara.BufferInfo.uiSize = 64;
|
||||||
|
DataPara.BufferInfo.pBuffer = getbuffer;
|
||||||
|
ret = uart3_operateData(&DataPara);*/
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 sf_mcu_write_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
|
{
|
||||||
|
UINT32 i;
|
||||||
|
unsigned int pnum = num;
|
||||||
|
if(0 <= sf_commu_set_mcu_many(reg, data, &pnum))
|
||||||
|
{
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
printf("W_addr[%d]=0x%02x\n", reg[i], data[i]);
|
||||||
|
}
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 sf_mcu_read_multi(UINT8 reg[], UINT8 data[], UINT32 num)
|
||||||
|
{
|
||||||
|
UINT32 i;
|
||||||
|
unsigned int pnum = num;
|
||||||
|
if(0 <= sf_commu_get_mcu_many(reg, data, &pnum))
|
||||||
|
{
|
||||||
|
for(i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
printf("R_addr[%d]=0x%02x\n", reg[i], data[i]);
|
||||||
|
}
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
Function: sf_mcu_power_on_para_get
|
||||||
|
Description: read MCU register data to update uipara and variable.
|
||||||
|
Input: attrId:which kind of para want to get
|
||||||
|
Output: N/A
|
||||||
|
Return: start mode
|
||||||
|
Others: N/A
|
||||||
|
*************************************************/
|
||||||
|
UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId)
|
||||||
|
{
|
||||||
|
UINT8 dataTemp1 = 0, dataTemp2 = 0;
|
||||||
|
UINT8 startMode = 0;
|
||||||
|
//UINT8 mcuVer = 0;
|
||||||
|
UINT8 mcuReg[REG_SIZE] = { 0 };
|
||||||
|
UINT8 mcuData[REG_SIZE] = { 0 };
|
||||||
|
UINT8 i = 0;
|
||||||
|
|
||||||
|
if(attrId != SF_MCU_POWERON)
|
||||||
|
{
|
||||||
|
sf_mcu_read(START_MODE, &dataTemp1);
|
||||||
|
startMode = dataTemp1 & 0x1F;
|
||||||
|
|
||||||
|
return startMode;
|
||||||
|
}
|
||||||
|
mcuReg[i] = MCU_SUB_VER;
|
||||||
|
mcuReg[i++] = MCU_VER_L;
|
||||||
|
mcuReg[i++] = MCU_VER_H;
|
||||||
|
mcuReg[i++] = MCU_PRODUCT_INFO;
|
||||||
|
mcuReg[i++] = START_MODE;
|
||||||
|
mcuReg[i++] = LUMINANCE_L;
|
||||||
|
mcuReg[i++] = LUMINANCE_H;
|
||||||
|
sf_mcu_read_multi(mcuReg, mcuData, i);
|
||||||
|
i = 0;
|
||||||
|
McuSubVersion = mcuData[i];
|
||||||
|
|
||||||
|
McuVersion = mcuData[i++];
|
||||||
|
McuVersion = (UINT16)mcuData[i++] << 8 | McuVersion;
|
||||||
|
McuProductInfo = mcuData[i++];
|
||||||
|
dataTemp1 = mcuData[i++];
|
||||||
|
startMode = dataTemp1 & 0x1F;
|
||||||
|
DailyReportStartMode = (dataTemp1 & 0xc0) >> 6;
|
||||||
|
dataTemp1= mcuData[i++];
|
||||||
|
dataTemp2 = mcuData[i++];
|
||||||
|
IRSHTTER = (dataTemp2 << 8) | dataTemp1;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
sf_mcu_read(MCU_SUB_VER, &McuSubVersion);
|
||||||
|
#if 0//defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
|
sf_mcu_read(MCU_VER, &mcuVer);
|
||||||
|
McuVersion = mcuVer;
|
||||||
|
#else
|
||||||
|
sf_mcu_read(MCU_VER_L, &mcuVer);
|
||||||
|
McuVersion = mcuVer;
|
||||||
|
sf_mcu_read(MCU_VER_H, &mcuVer);
|
||||||
|
McuVersion = (UINT16)mcuVer << 8 | McuVersion;
|
||||||
|
sf_mcu_read(MCU_PRODUCT_INFO, &McuProductInfo);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sf_mcu_read(START_MODE, &dataTemp1);
|
||||||
|
startMode = dataTemp1 & 0x1F;
|
||||||
|
DailyReportStartMode = (dataTemp1 & 0xc0) >> 6;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
sf_mcu_i2c_read(CAMERA_MODE, &CameraMode);
|
||||||
|
sf_mcu_i2c_read(IRLED_LUMINANCE, &IrLedPercent);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sf_mcu_read(LUMINANCE_L, &dataTemp1);
|
||||||
|
sf_mcu_read(LUMINANCE_H, &dataTemp2);
|
||||||
|
IRSHTTER = (dataTemp2 << 8) | dataTemp1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
|
if(startMode == PWR_ON_TIME_SYNC)
|
||||||
|
{
|
||||||
|
startMode = PWR_ON_DAILY_REPORT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
if(startMode > PWR_ON_TIME_SEND) //if start mode err, USB IN default power on SETUP
|
||||||
|
{
|
||||||
|
startMode = PWR_ON_SETUP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf(" start mode = %d IRSHTTER = %d\n", startMode, IRSHTTER);
|
||||||
|
|
||||||
|
return startMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int sf_off_mcu(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if HUNTING_MCU_I2C != ENABLE
|
||||||
|
uart3_close();
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
Function: sf_get_daily_report_start_mode
|
||||||
|
Description: get dailyreport start mode
|
||||||
|
Input: N/A
|
||||||
|
Output: N/A
|
||||||
|
Return: 0:ON mode 1:OFF mode
|
||||||
|
Others: N/A
|
||||||
|
*************************************************/
|
||||||
|
UINT8 sf_get_daily_report_start_mode(void)
|
||||||
|
{
|
||||||
|
return DailyReportStartMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
UINT8 sf_mcu_wdg_set(UINT8 value)
|
UINT8 sf_mcu_wdg_set(UINT8 value)
|
||||||
{
|
{
|
||||||
|
@ -1064,6 +1197,8 @@ UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val)
|
||||||
sf_mcu_write_multi(mcuReg, mcuData, i);
|
sf_mcu_write_multi(mcuReg, mcuData, i);
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
//#if 1
|
||||||
|
|
||||||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
|
@ -1198,7 +1333,7 @@ UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val)
|
||||||
if(gpsAlwaysFlag && simCardInsert)
|
if(gpsAlwaysFlag && simCardInsert)
|
||||||
temp |= 0x80;
|
temp |= 0x80;
|
||||||
|
|
||||||
mcuReg[i] = FUNCTION_SWTICH;
|
mcuReg[i] = FUNCTION_SWTICH0;
|
||||||
mcuData[i++] = temp;
|
mcuData[i++] = temp;
|
||||||
|
|
||||||
if(SysGetFlag(TimelapseSwitch))
|
if(SysGetFlag(TimelapseSwitch))
|
||||||
|
@ -1705,7 +1840,7 @@ int sf_mod_init(void)
|
||||||
#if HUNTING_MCU_I2C == ENABLE
|
#if HUNTING_MCU_I2C == ENABLE
|
||||||
rt = sf_init_mcu();
|
rt = sf_init_mcu();
|
||||||
#else
|
#else
|
||||||
sf_commu_mcu_task_start();
|
rt = sf_commu_mcu_task_start();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
; Source Insight Project File List
|
; Source Insight Project File List
|
||||||
; Project Name: na51089_linux_sdk_rtos
|
; Project Name: na51089_rtos
|
||||||
; Generated by Source Insight 4.00.0107 at 2023/3/13 17:07:06
|
; Generated by Source Insight 4.00.0107 at 2023/3/28 16:02:21
|
||||||
; Version=4.00.0107
|
; Version=4.00.0107
|
||||||
;
|
;
|
||||||
; Each line should contain either a file name, a wildcard, or a sub-directory name.
|
; Each line should contain either a file name, a wildcard, or a sub-directory name.
|
||||||
|
@ -9,24 +9,42 @@
|
||||||
application\Makefile
|
application\Makefile
|
||||||
application\source\cardv\gprof_user_guide.txt
|
application\source\cardv\gprof_user_guide.txt
|
||||||
application\source\cardv\Makefile
|
application\source\cardv\Makefile
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxCamera_Sensor.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxCamera_Sensor.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxCfg.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxCfg.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxCfg.h
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxCfg.h
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxCmd.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxCmd.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxDisplay_LCD.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxDisplay_LCD.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxHunting.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxHunting.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxInput_Key.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxInput_Key.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxOutput_LED.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxOutput_LED.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxPower_Battery.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxPower_Battery.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxPower_DC.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxPower_DC.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxSound_Audio.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxSound_Audio.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxStorage_Card.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxStorage_Card.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxStorage_EmbMem.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxStorage_EmbMem.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxUsb.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxUsb.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\DxWiFi.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\DxWiFi.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\IOCfg.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\IOCfg.c
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\IOCfg.h
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\IOCfg.h
|
||||||
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G\sf_led.c
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_68CS\sf_led.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxCamera_Sensor.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxCfg.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxCfg.h
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxCmd.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxDisplay_LCD.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxHunting.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxInput_Key.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxOutput_LED.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxPower_Battery.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxPower_DC.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxSound_Audio.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxStorage_Card.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxStorage_EmbMem.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxUsb.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\DxWiFi.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\IOCfg.c
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\IOCfg.h
|
||||||
|
application\source\cardv\SrcCode\Dx\565_HUNTING_EVB_LINUX_4G_S530\sf_led.c
|
||||||
application\source\cardv\SrcCode\Dx\DxCommon.c
|
application\source\cardv\SrcCode\Dx\DxCommon.c
|
||||||
application\source\cardv\SrcCode\Dx\DxVer.c
|
application\source\cardv\SrcCode\Dx\DxVer.c
|
||||||
application\source\cardv\SrcCode\Dx\include\DrvExt.h
|
application\source\cardv\SrcCode\Dx\include\DrvExt.h
|
||||||
|
@ -259,6 +277,8 @@ application\source\cardv\SrcCode\NVTUserCommand.h
|
||||||
application\source\cardv\SrcCode\PrjCfg.h
|
application\source\cardv\SrcCode\PrjCfg.h
|
||||||
application\source\cardv\SrcCode\PrjCfg_Default.h
|
application\source\cardv\SrcCode\PrjCfg_Default.h
|
||||||
application\source\cardv\SrcCode\PrjCfg_HUNTING.h
|
application\source\cardv\SrcCode\PrjCfg_HUNTING.h
|
||||||
|
application\source\cardv\SrcCode\PrjCfg_HUNTING_68CS.h
|
||||||
|
application\source\cardv\SrcCode\PrjCfg_HUNTING_S530.h
|
||||||
application\source\cardv\SrcCode\PrjInc.h
|
application\source\cardv\SrcCode\PrjInc.h
|
||||||
application\source\cardv\SrcCode\ProjectInfo.h
|
application\source\cardv\SrcCode\ProjectInfo.h
|
||||||
application\source\cardv\SrcCode\Startup\bin_info.c
|
application\source\cardv\SrcCode\Startup\bin_info.c
|
||||||
|
@ -627,6 +647,7 @@ driver\na51089\include\pmu.h
|
||||||
driver\na51089\include\PowerIC_i2c.h
|
driver\na51089\include\PowerIC_i2c.h
|
||||||
driver\na51089\include\remote.h
|
driver\na51089\include\remote.h
|
||||||
driver\na51089\include\serial.h
|
driver\na51089\include\serial.h
|
||||||
|
driver\na51089\include\sf_commu_mcu.h
|
||||||
driver\na51089\include\sf_mcu.h
|
driver\na51089\include\sf_mcu.h
|
||||||
driver\na51089\include\touch\touch_common.h
|
driver\na51089\include\touch\touch_common.h
|
||||||
driver\na51089\include\touch\touch_dbg.h
|
driver\na51089\include\touch\touch_dbg.h
|
||||||
|
@ -658,6 +679,7 @@ driver\na51089\source\icomm_ssv6x5x\wifi\ssv6x5x\novatek_wifi.h
|
||||||
driver\na51089\source\icomm_ssv6x5x\wifi\ssv6x5x\ssv_wifi_api.h
|
driver\na51089\source\icomm_ssv6x5x\wifi\ssv6x5x\ssv_wifi_api.h
|
||||||
driver\na51089\source\icomm_ssv6x5x\wifi\wifi.c
|
driver\na51089\source\icomm_ssv6x5x\wifi\wifi.c
|
||||||
driver\na51089\source\mcu\Makefile
|
driver\na51089\source\mcu\Makefile
|
||||||
|
driver\na51089\source\mcu\sf_commu_mcu.c
|
||||||
driver\na51089\source\mcu\sf_i2c_driver.c
|
driver\na51089\source\mcu\sf_i2c_driver.c
|
||||||
driver\na51089\source\mcu\sf_mcu_dev.c
|
driver\na51089\source\mcu\sf_mcu_dev.c
|
||||||
driver\na51089\source\mcu\sf_sd_common.c
|
driver\na51089\source\mcu\sf_sd_common.c
|
||||||
|
|
Loading…
Reference in New Issue
Block a user