本文整理汇总了C++中LOG_INF函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_INF函数的具体用法?C++ LOG_INF怎么用?C++ LOG_INF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG_INF函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AF_i2c_probe
/* Kirby: add new-style driver {*/
static int AF_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
int i4RetValue = 0;
LOG_INF("Start\n");
/* Kirby: add new-style driver { */
g_pstAF_I2Cclient = client;
g_pstAF_I2Cclient->addr = I2C_SLAVE_ADDRESS;
g_pstAF_I2Cclient->addr = g_pstAF_I2Cclient->addr >> 1;
//Register char driver
i4RetValue = Register_AF_CharDrv();
if(i4RetValue){
LOG_INF(" register char device failed!\n");
return i4RetValue;
}
spin_lock_init(&g_AF_SpinLock);
LOG_INF("Attached!! \n");
return 0;
}
示例2: BU6424AF_Release
/* Q1 : Try release multiple times. */
int BU6424AF_Release(struct inode *a_pstInode, struct file *a_pstFile)
{
LOG_INF("Start\n");
if (*g_pAF_Opened == 2) {
char puSendCmd[2];
puSendCmd[0] = (char)(0x00);
puSendCmd[1] = (char)(0x00);
i2c_master_send(g_pstAF_I2Cclient, puSendCmd, 2);
LOG_INF("Wait\n");
/*s4AF_WriteReg(200);
msleep(20);
s4AF_WriteReg(100);
msleep(20);*/
}
if (*g_pAF_Opened) {
LOG_INF("Free\n");
spin_lock(g_pAF_SpinLock);
*g_pAF_Opened = 0;
spin_unlock(g_pAF_SpinLock);
}
LOG_INF("End\n");
return 0;
}
示例3: usb_dc_ep_check_cap
int usb_dc_ep_check_cap(const struct usb_dc_ep_cfg_data *const cfg)
{
u8_t ep_idx = EP_ADDR2IDX(cfg->ep_addr);
if ((cfg->ep_type == USB_DC_EP_CONTROL) && ep_idx) {
LOG_ERR("invalid endpoint configuration");
return -1;
}
if (ep_idx >= NUM_OF_EP_MAX) {
LOG_ERR("endpoint index/address out of range");
return -1;
}
if (ep_idx & BIT(0)) {
if (EP_ADDR2DIR(cfg->ep_addr) != USB_EP_DIR_IN) {
LOG_INF("pre-selected as IN endpoint");
return -1;
}
} else {
if (EP_ADDR2DIR(cfg->ep_addr) != USB_EP_DIR_OUT) {
LOG_INF("pre-selected as OUT endpoint");
return -1;
}
}
return 0;
}
示例4: I2C_read__FBAF
// *****************************************************
// **** Read from the Peripheral register < 82h >
// **** ------------------------------------------------
// **** CL_UBYTE adr Peripheral Address
// **** CL_UWORD dat Read data
// *****************************************************
static CL_UWORD I2C_read__FBAF( CL_UBYTE u08_adr )
{
int i4RetValue = 0;
char pBuff[1] = {(char)(u08_adr & 0xFF)};
CL_UWORD vRcvBuff=0;
spin_lock(&g_AF_SpinLock);
g_pstAF_I2Cclient->addr = (I2C_SLAVE_ADDRESS >> 1);
g_pstAF_I2Cclient->ext_flag = (g_pstAF_I2Cclient->ext_flag)&(~I2C_DMA_FLAG);
spin_unlock(&g_AF_SpinLock);
i4RetValue = i2c_master_send(g_pstAF_I2Cclient, pBuff, 1);
if (i4RetValue < 0 )
{
LOG_INF("[CAMERA SENSOR] read I2C send failed!!\n");
return i4RetValue;
}
i4RetValue = i2c_master_recv(g_pstAF_I2Cclient, (u8*)&vRcvBuff, 2);
if (i4RetValue != 2)
{
LOG_INF("[CAMERA SENSOR] I2C read failed!! \n");
return i4RetValue;
}
//vRcvBuff= ((vRcvBuff&0xFF) <<8) + ((vRcvBuff>> 8)&0xFF) ;
vRcvBuff=((vRcvBuff<<8)&0xff00)|((vRcvBuff>>8)&0x00ff);
LOG_INF("I2C r2 (%x %x) \n",u08_adr,vRcvBuff);
return vRcvBuff;
}
示例5: combiroutes
/**
* Constructor for the combi combiroutes
* @param n number of combi combiroutes to be created
* @exception Calls exit if no RAM available
*/
void combiroutes(const unsigned short nr)
{
unsigned short i, j;
struct sCombiroute * pCombiroute;
LOG_INF("started");
m_nrCombiroutes = nr;
m_pCombiroutes = malloc(m_nrCombiroutes * sizeof(struct sCombiroute));
if(NULL == m_pCombiroutes)
{
/* error allocating */
LOG_ERR("cannot allocate RAM of train combiroutes");
exit(EXIT_FAILURE);
}
pCombiroute = m_pCombiroutes;
for(i = 0; i < m_nrCombiroutes; i++)
{
pCombiroute->name[0] = '\0';
pCombiroute->start = NULL;
pCombiroute->dest = NULL;
pCombiroute->partsAddPosition = 0;
for(j = 0; j < NRCOMBIPARTS; j++)
{
pCombiroute->pRoute[j] = NULL;
}
pCombiroute++;
}
LOG_INF("ended");
}
示例6: otp_wb_update
/*************************************************************************************************
* Function : otp_wb_update
* Description : Update WB correction
* Return : [bool] 0 : OTP data fail
1 : otp_WB update success
**************************************************************************************************/
bool otp_wb_update(BYTE zone)
{
USHORT golden_g, current_g;
if(!get_otp_wb(zone)) // get wb data from otp
{
LOG_INF("Get OTP WB data Err!\n");
return 0;
}
golden_g = (golden_gr + golden_gb) / 2;
current_g = (current_gr + current_gb) / 2;
if(!golden_g || !current_g || !golden_r || !golden_b || !current_r || !current_b)
{
LOG_INF("WB update Err !\n");
return 0;
}
r_ratio = 512 * golden_r * current_g /( golden_g * current_r );
b_ratio = 512 * golden_b * current_g /( golden_g * current_b );
wb_gain_set();
LOG_INF("OTP WB update finished! \n");
return 1;
}
示例7: AF_Open
//Main jobs:
// 1.check for device-specified errors, device not ready.
// 2.Initialize the device if it is opened for the first time.
// 3.Update f_op pointer.
// 4.Fill data structures into private_data
//CAM_RESET
static int AF_Open(struct inode * a_pstInode, struct file * a_pstFile)
{
LOG_INF("Start \n");
if(g_s4AF_Opened)
{
LOG_INF("The device is opened \n");
return -EBUSY;
}
spin_lock(&g_AF_SpinLock);
g_s4AF_Opened = 1;
spin_unlock(&g_AF_SpinLock);
I2C_func_POFF_____( ); // reset the IC
I2C_func_PON______( ); // Power ON
func_INITIALIZE( ); // initialize the IC
func_ReLOAD_FACT_DATA( ); // ReLoad Adjustment Data
I2C_func_DSP_START( ); // CLAF Function Enable
EQ_CONTROL( 0x0004 );
LOG_INF("End \n");
return 0;
}
示例8: AF_Release
//Main jobs:
// 1.Deallocate anything that "open" allocated in private_data.
// 2.Shut down the device on last close.
// 3.Only called once on last time.
// Q1 : Try release multiple times.
static int AF_Release(struct inode * a_pstInode, struct file * a_pstFile)
{
LOG_INF("Start \n");
if (g_s4AF_Opened == 2)
{
g_sr = 5;
s4AF_WriteReg(200);
msleep(10);
s4AF_WriteReg(100);
msleep(10);
}
if (g_s4AF_Opened)
{
LOG_INF("Free \n");
spin_lock(&g_AF_SpinLock);
g_s4AF_Opened = 0;
g_sr = 5;
spin_unlock(&g_AF_SpinLock);
}
LOG_INF("End \n");
return 0;
}
示例9: sections
/**
* Constructor for the sections
* @param nr number of sections to be created
* @exception Calls exit if no RAM available
*/
void sections(const unsigned short nr)
{
unsigned short i, j;
struct sSection * ptr;
LOG_INF("started");
m_nrSection = nr;
m_pSection = malloc(m_nrSection * sizeof(struct sSection));
if(NULL == m_pSection)
{
/* error allocating */
LOG_ERR("cannot allocate RAM of sections");
exit(EXIT_FAILURE);
}
ptr = m_pSection;
for(i = 0; i < m_nrSection; i++)
{
ptr->name[0] = '\0';
ptr->BI_occDetector = NONEVALUE;
ptr->DuoledAddPosition = 0;
ptr->line = neutral;
ptr->linePrev = neutral;
ptr->free = false;
ptr->wasFree = false;
ptr->route = false;
ptr->wasRoute = false;
for(j = 0; j < NRBLOCKPL; j++)
{
ptr->pDuoled[j] = NULL;
}
ptr++;
}
LOG_INF("ended");
}
示例10: commInit
void commInit(void)
{
LOG_INF("started");
sockKill = false;
pthread_create(& sockThread, NULL, sockFunction, (void *) sock);
LOG_INF("ended");
}
示例11: GLOBAL_PROFILING_LOG_PRINT
//-----------------------------------------------------------------------------
MBOOL TdriMgrImp::uninit(void)
{
MBOOL Result = MTRUE;
int i;
//
GLOBAL_PROFILING_LOG_PRINT(__func__);
GLOBAL_PROFILING_LOG_PRINT("Uninit TdriMgr");
//
Mutex::Autolock lock(mLock);
//
LOG_INF("mInitCount(%d)",mInitCount);
//
android_atomic_dec(&mInitCount);
//
if(mInitCount > 0) {
goto EXIT;
}
for(i=TPIPE_DRV_CQ01; i<=TPIPE_DRV_CQ02; i++) {
if(i == TPIPE_DRV_CQ01) {
pIspDrv->lockSemaphoreCq1();
tdriMgrInfo[i].pDescriptorArray = NULL;
tdriMgrInfo[i].pDesriptorNum = 0;
tdriMgrInfo[i].pTopCtlEn1 = 0;
tdriMgrInfo[i].pTopCtlEn2 = 0;
tdriMgrInfo[i].pTopCtlDma = 0;
pIspDrv->unlockSemaphoreCq1();
} else if (i == TPIPE_DRV_CQ02) {
pIspDrv->lockSemaphoreCq2();
tdriMgrInfo[i].pDescriptorArray = NULL;
tdriMgrInfo[i].pDesriptorNum = 0;
tdriMgrInfo[i].pTopCtlEn1 = 0;
tdriMgrInfo[i].pTopCtlEn2 = 0;
tdriMgrInfo[i].pTopCtlDma = 0;
pIspDrv->unlockSemaphoreCq2();
} else {
LOG_ERR("[ERROR]not support this tdri cq(%d) number \n");
}
}
//tpipe driver
pTdriDri->uninit();
pTdriDri->destroyInstance();
pTdriDri = NULL;
//isp drv
pIspDrv->setCallbacks(NULL, NULL);
pIspDrv->uninit();
pIspDrv->destroyInstance();
pIspDrv = NULL;
LOG_INF("Release\n");
EXIT:
return Result;
}
示例12: flushSetting
//-----------------------------------------------------------------------------
MBOOL
TdriMgrImp::
flushSetting(
ISP_DRV_CQ_ENUM ispCq
)
{
LOCAL_PROFILING_LOG_AUTO_START(Event_TdriMgr);
LOCAL_PROFILING_LOG_PRINT("flushSetting");
LOG_INF("E:Cq(%d)",ispCq);
//
if(tdriMgrCqMap[ispCq].tdriMgrCQ == TPIPE_DRV_CQ01) {
pIspDrv->lockSemaphoreCq1();
// flush setting
::memset((char*)&tdriMgrInfo[TPIPE_DRV_CQ01].tdriTurningSetting, 0x00, sizeof(TDRI_MGR_TPIPE_TABLE_TURNING));
::memset((char*)&tdriMgrInfo[TPIPE_DRV_CQ01].tdriMgrCfg, 0x00, sizeof(TdriDrvCfg));
tdriMgrInfo[TPIPE_DRV_CQ01].tdriMgrCfg.updateTdri.updateType = TPIPE_DRV_UPDATE_TYPE_CQ1_TURNING_SAVE;
refreshTableSetting(TPIPE_DRV_CQ01, 0xffffffff); // refresh all setting
tdriMgrInfo[TPIPE_DRV_CQ01].tdriMgrCfg.updateTdri.partUpdateFlag = 0xffffffff; // clean Tpipe update flag
handleTpipeTable(TPIPE_DRV_CQ01);
pIspDrv->setTurnTopEn1(ISP_DRV_CQ01, ISP_DRV_TURNING_TOP_RESET);
pIspDrv->setTurnTopEn2(ISP_DRV_CQ01, ISP_DRV_TURNING_TOP_RESET);
pIspDrv->setTurnTopDma(ISP_DRV_CQ01, ISP_DRV_TURNING_TOP_RESET);
pIspDrv->flushTurnCqTable(ISP_DRV_CQ01);
//
pIspDrv->unlockSemaphoreCq1();
}
else if(tdriMgrCqMap[ispCq].tdriMgrCQ == TPIPE_DRV_CQ02) {
pIspDrv->lockSemaphoreCq2();
// flush setting
::memset((char*)&tdriMgrInfo[TPIPE_DRV_CQ02].tdriTurningSetting, 0x00, sizeof(TDRI_MGR_TPIPE_TABLE_TURNING));
::memset((char*)&tdriMgrInfo[TPIPE_DRV_CQ02].tdriMgrCfg, 0x00, sizeof(TdriDrvCfg));
tdriMgrInfo[TPIPE_DRV_CQ02].tdriMgrCfg.updateTdri.updateType = TPIPE_DRV_UPDATE_TYPE_CQ2_TURNING_SAVE;
refreshTableSetting(TPIPE_DRV_CQ02, 0xffffffff); // refresh all setting
tdriMgrInfo[TPIPE_DRV_CQ02].tdriMgrCfg.updateTdri.partUpdateFlag = 0xffffffff; // clean Tpipe update flag
handleTpipeTable(TPIPE_DRV_CQ02);
pIspDrv->setTurnTopEn1(ISP_DRV_CQ02, ISP_DRV_TURNING_TOP_RESET);
pIspDrv->setTurnTopEn2(ISP_DRV_CQ02, ISP_DRV_TURNING_TOP_RESET);
pIspDrv->setTurnTopDma(ISP_DRV_CQ02, ISP_DRV_TURNING_TOP_RESET);
pIspDrv->flushTurnCqTable(ISP_DRV_CQ02);
//
pIspDrv->unlockSemaphoreCq2();
}
else {
LOG_WRN("not support this tMgrCq(%d) for flush",tdriMgrCqMap[ispCq].tdriMgrCQ);
return MFALSE;
}
LOG_INF("X\n",ispCq);
LOCAL_PROFILING_LOG_PRINT("End flushSetting");
return MTRUE;
}
示例13: otp_update
/*************************************************************************************************
* Function : otp_update()
* Description : update otp data from otp , it otp data is valid,
it include get ID and WB update function
* Return : [bool] 0 : update fail
1 : update success
**************************************************************************************************/
bool otp_update(BYTE update_sensor_otp_awb, BYTE update_sensor_otp_lsc)
{
BYTE zone = 0x01;
BYTE FLG = 0x00;
BYTE MID = 0x00;
int i;
LOG_INF("update_sensor_otp_awb: %d, update_sensor_otp_lsc: %d\n", update_sensor_otp_awb, update_sensor_otp_lsc );
for(i=0;i<3;i++)
{
FLG = get_otp_flag(zone);
if(FLG == VALID_OTP)
break;
else
zone++;
}
if(i==3)
{
LOG_INF("No OTP Data or OTP data is invalid!!!\n");
return 0;
}
MID = get_otp_module_id(zone);
#ifdef DEBUG_IMX135_OTP
get_otp_lens_id(zone);
get_otp_vcm_id(zone);
#endif
if(MID != TRULY_ID) //Select
{
LOG_INF("No Truly Module !!!!\n");
return 0;
}
if(0 != update_sensor_otp_awb && _otp_awb_set == 0) {
if(otp_wb_update(zone)){
spin_lock(&imx135_otp_lock);
_otp_awb_set = 1;
spin_unlock(&imx135_otp_lock);
}
}
if(0 != update_sensor_otp_lsc && _otp_lsc_set == 0)
{
if(!otp_lenc_update())
{
LOG_INF("OTP Update LSC Err\n");
return 0;
}
spin_lock(&imx135_otp_lock);
_otp_lsc_set = 1;
spin_unlock(&imx135_otp_lock);
}
return 1;
}
示例14: duoledDestroy
/**
* Destructor.
*
* To free the allocated RAM, call this function before terminating the program.
*/
void duoledDestroy(void)
{
LOG_INF("started");
free(m_pDuoled);
m_pDuoled = NULL;
m_nrDuoled = 0;
m_DuoledAddPosition = 0;
LOG_INF("ended");
}
示例15: LOG_INF
MdpMgr *MdpMgr::createInstance()
{
LOG_INF("+");
DBG_LOG_CONFIG(imageio, mdpmgr);
static MdpMgrImp singleton;
LOG_INF("-");
return &singleton;
}