本文整理汇总了C++中rk28printk函数的典型用法代码示例。如果您正苦于以下问题:C++ rk28printk函数的具体用法?C++ rk28printk怎么用?C++ rk28printk使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rk28printk函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rkusb_function_call_callback
/*
* 20100111,[email protected],use LUN to dicide call at task or irq.
* lun==0: at irq , other at task.
*/
static int rkusb_function_call_callback( struct rkusb_dev *dev )
{
int ret;
rk28printk("%s::cmd=%s,crash=%d\n" , __func__ , (char*) dev->req_out->buf , rk28_system_crash );
if( !__rkusb_write_enable() ) {
//if( !strcmp((char*) dev->req_out->buf , rkusb_en_read) ) {
// rk28_system_crash = 2;
// rkusb_send_csw_result( dev , rk28_system_crash);
// return RKUSB_CB_OK_NONE;
//}
if( !strcmp((char*) dev->req_out->buf , rkusb_en_write) ) {
rk28_system_crash = RKDBG_WRITE;
rkusb_send_csw_result( dev , rk28_system_crash);
return RKUSB_CB_OK_NONE;
}
return RKUSB_CB_FAILD;
}
if( DEV_LUN(dev) == 0 ) {
ret = __rk28_scu_parse_cmd((char*) dev->req_out->buf);
rk28printk("cmd ret = 0x%x(%d)" , ret ,ret );
rkusb_send_csw_result( dev , ret );
} else {
rkusb_wakeup_thread( dev );
}
return RKUSB_CB_OK_NONE;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:30,代码来源:rk28_usb.c
示例2: GetFirmwareInformation
// ================================================================================
// Function Name --- GetFirmwareInformation
// Description --- Get firmware information
// Input --- NULL
//Output --- return true if the command execute successfully, otherwuse return false.
// ================================================================================
bool GetFirmwareInformation(struct i2c_client *client)
{
u8 ucWriteLength, ucReadLength;
u8 pucData[128];
u8 ucQuery;
int i;
ucWriteLength = 2;
ucReadLength = 0x09;
pucData[0] = 0x01;
pucData[1] = 0x00;
// Query
do
{
if(!ReadQueryBuffer(client, &ucQuery))
{
ucQuery = QUERY_BUSY;
}
}while(ucQuery & QUERY_BUSY);
// Write Command
if(!WriteCommandBuffer(client, pucData, ucWriteLength))
{
return false;
}
// Query
do
{
if(!ReadQueryBuffer(client, &ucQuery))
{
ucQuery = QUERY_BUSY;
}
}while(ucQuery & QUERY_BUSY);
pucData[5]= 0 ;
pucData[6]= 0 ;
pucData[7]= 0 ;
pucData[8]= 0;
// Read Command Response
if(!ReadCommandResponseBuffer(client, pucData, ucReadLength))
{
return false;
}
for (i =0;i<ucReadLength;i++)
rk28printk("GetFirmwareInformation pucData[%d]=%d \r\n",i,pucData[i]);
if(pucData[5]== 0
&& pucData[6] == 0
&& pucData[7] == 0
&& pucData[8] == 0)
{
// There is no flash code
rk28printk("There is no flash code \r\n");
return false;
}
return true;
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:66,代码来源:ctp_it7250.c
示例3: rk28_AD_irq_handler
//[email protected]
static irqreturn_t rk28_AD_irq_handler(s32 irq, void *dev_id)
{
rk28printk("\n =================================rk28_AD_irq_handler===================================\n");
rk28printk("========= pm_sleep_status=%d PA0=%d\n", pm_sleep_status, GPIOGetPinLevel(WAKEUP_KEY_PORT));
if( pm_sleep_status == 1)
{
g_wake_press = !GPIOGetPinLevel(WAKEUP_KEY_PORT);
rk28printk("========== in sleep: g_wakeup_key_enable=%d g_wake_press=%d\n", g_wakeup_key_enable, g_wake_press);
if(g_wakeup_key_enable)
{
input_report_key(prockAD_button->input_dev,AD1KEY5,1);
input_sync(prockAD_button->input_dev);
input_report_key(prockAD_button->input_dev,AD1KEY5,0);
input_sync(prockAD_button->input_dev);
printk("\n%s^^level 2^^Wake Up ^^^^^!!\n",__FUNCTION__);
g_wakeup_key_enable = 0;
// [email protected]: 只有在5S后,或者系统被唤醒后(pm_sleep_status == 1),才能再处理唤醒IRQ
setup_timer(&g_wakeup_key_timer, rk28_enable_wakeup_key, (unsigned long)0);
g_wakeup_key_timer.expires = jiffies + (5*HZ);
add_timer(&g_wakeup_key_timer);
}
}
return IRQ_HANDLED;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:30,代码来源:rk28_mid_ipad.c
示例4: Ctp_it7250_tx_data
static int Ctp_it7250_tx_data(struct i2c_client *client, u8 reg,char *txData, int length)
{
#if 0
int ret,i;
struct i2c_adapter *adap = client->adapter;
struct i2c_msg msg;
u8 buf[128];//128
// rk28printk("reg=0x%x txData=0x%x \r\n",reg,*txData);
buf[0]=reg;
for (i=0;i<length;i++)
{
buf[i+1]=*txData++;
rk28printk("buf[%d]=0x%x ",i+1,buf[i+1]);
}
rk28printk("\r\n");
// rk28printk("buf[0]=0x%x buf[1]=0x%x",buf[0],buf[1]);
msg.addr = client->addr;
//rk28printk("i2c addr=0x%x",msg.addr);
msg.buf =&buf[0];
msg.len = length+1;//+1 means add the reg length;by roberts
msg.flags = client->flags;
msg.scl_rate = 400*1000;
ret = i2c_transfer(adap, &msg, 1);
return ret;
#else
return i2c_master_reg8_send(client, reg, txData, length, 400 * 1000);
#endif
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:34,代码来源:ctp_it7250.c
示例5: rkusb_init
/*
* init call at msc or adb set alt.use buf_length to distinguish.
* adb first!
* __attribute__((weak))
*/
int rkusb_init(struct rkusb_dev_fsg* dev , struct usb_ep* in_ep ,
struct usb_ep* out_ep , int fsg )
{
if( !dev ) {
rk28printk("%s::clear rkusb\n" , __func__ );
rkusb_reinit_req(_rkusb_dev,NULL,out_ep);
_rkusb_dev->ep_in = NULL;
return 0;
}
rk28printk("%s::init rkusb,fsg=%d\n" , __func__ , fsg );
dev->usb_out = NULL;
/*
* 4 init case :
* 0: only fsg , 1:only adb , 2:fsg first,adb second , 3:adb first,fsg second.
* we want:if have adb,select adb ,then select fsg.
*/
if( !_rkusb_dev->ep_in || fsg == 0) {
if( _rkusb_dev->fsg_dev )
_rkusb_dev->fsg_dev->usb_out_bak = NULL;
rkusb_reinit_req(_rkusb_dev,in_ep,out_ep);
_rkusb_dev->fsg_dev = dev;
_rkusb_dev->fsg = fsg;
dev->usb_out_bak = rkusb_complete_out;
}
dev->rk_dev = _rkusb_dev;
return 0;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:32,代码来源:rk28_usb.c
示例6: Ctp_it7250_init
static int __init Ctp_it7250_init(void)
{
int ret;
rk28printk("+++++++ %s++\n", __FUNCTION__);
ret=i2c_add_driver(&Ctp_it7250_driver);
rk28printk("**Ctp_it7250_init_init return %d**\n",ret);
return ret;
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:8,代码来源:ctp_it7250.c
示例7: rk28_AD_irq_handler
//[email protected]
static irqreturn_t rk28_AD_irq_handler(s32 irq, void *dev_id)
{
rk28printk("\n =================================rk28_AD_irq_handler===================================\n");
if( rk28_pm_status == 1)
{
input_report_key(prockAD_button->input_dev,AD1KEY5,1);
input_sync(prockAD_button->input_dev);
input_report_key(prockAD_button->input_dev,AD1KEY5,0);
input_sync(prockAD_button->input_dev);
g_wake =1;
}
rk28printk("\n%s^^^^Wake Up ^^^^^!!\n",__FUNCTION__);
return IRQ_HANDLED;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:16,代码来源:rk28_mid_ipady1006oldv7.c
示例8: ts_input_init
static int ts_input_init(struct i2c_client *client)
{
int ret = -1,i;
struct Ctp_it7250_data *Ctp_it7250;
Ctp_it7250 = i2c_get_clientdata(client);
/* register input device */
Ctp_it7250->input_dev = input_allocate_device();
if (Ctp_it7250->input_dev == NULL) {
pr_emerg( "%s: failed to allocate input dev\n",
__FUNCTION__);
return -ENOMEM;
}
rk28printk("+++++++ %s+++++++\n", __FUNCTION__);
Ctp_it7250->input_dev->name = "CTS_Ctp_it7250";
Ctp_it7250->input_dev->phys = "CTS_Ctp_it7250/input1";
Ctp_it7250->input_dev->dev.parent = &client->dev;
//no need to open & close it,it will do it automaticlly;noted by robert
Ctp_it7250->input_dev->open = Ctp_it7250_touch_open;
Ctp_it7250->input_dev->close = Ctp_it7250_touch_close;
__set_bit(EV_ABS, Ctp_it7250->input_dev->evbit);
__set_bit(ABS_X, Ctp_it7250->input_dev->absbit);
__set_bit(ABS_Y, Ctp_it7250->input_dev->absbit);
__set_bit(EV_SYN, Ctp_it7250->input_dev->evbit);
__set_bit(EV_KEY, Ctp_it7250->input_dev->evbit);
__set_bit(BTN_TOUCH, Ctp_it7250->input_dev->keybit);
for (i = 0; i < ARRAY_SIZE(panel_key_info); i++)
{rk28printk("ts_input_init i=%d\r\n",i);
__set_bit(panel_key_info[i].key,Ctp_it7250->input_dev->keybit);
}
//__clear_bit(0, input_dev->keybit);
input_set_abs_params(Ctp_it7250->input_dev, ABS_X, 0, 1000, 0, 0);
input_set_abs_params(Ctp_it7250->input_dev, ABS_Y, 0, 1000, 0, 0);
//pr_emerg("+++++++ %s\n", __FUNCTION__);
ret = input_register_device(Ctp_it7250->input_dev);
if (ret) {
pr_emerg(
"%s: unabled to register input device, ret = %d\n",
__FUNCTION__, ret);
return ret;
}
rk28printk("+++++++ %s+++++++END\n", __FUNCTION__);
return 0;
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:48,代码来源:ctp_it7250.c
示例9: mma7660_get_data
static int mma7660_get_data(struct i2c_client *client)
{
char buffer[3];
int ret;
int x, y, z;
struct mma7660_axis axis;
struct mma8452_platform_data *pdata = client->dev.platform_data;
do {
memset(buffer, 0, 3);
buffer[0] = MMA7660_REG_X_OUT;
ret = mma7660_rx_data(client, &buffer[0], 3);
if (ret < 0)
return ret;
} while ((buffer[0] & 0x40) || (buffer[1] & 0x40) || (buffer[2] & 0x40));
x = mma7660_convert_to_int(buffer[MMA7660_REG_Y_OUT])*YSENSIT;
y = mma7660_convert_to_int(buffer[MMA7660_REG_X_OUT])*XSENSIT;
z = mma7660_convert_to_int(buffer[MMA7660_REG_Z_OUT])*ZSENSIT;
#if defined(CONFIG_MACH_RK29_ODYS_NEOX8)
axis.x = x;
axis.y = -z;
axis.z = y;
#elif defined(CONFIG_MACH_RK29_ODYS_NEOX7)
axis.x = -x;
axis.y = -z;
axis.z = -y;
#elif defined(CONFIG_MACH_ODYS_LOOX_PLUS) || defined(CONFIG_MACH_ODYS_NEXT)
axis.x = x;
axis.y = z;
axis.z = -y;
#else
axis.x = y;
axis.y = -x;
axis.z = z;
#endif
// printk("l=%-4d,x=%-5d, y=%-5d, z=%-5d. %s:\n",__LINE__,axis.x, axis.y, axis.z, __func__);
// printk("%s: x=%-5d, y=%-5d, z=%-d\n",__func__, axis.x, axis.y, axis.z);
mma7660_report_value(client, &axis);
// Xaverage = Yaverage = Zaverage = 0;
//����RawDataLength��ֵ��ƽ��ֵ
Xaverage += axis.x;
Yaverage += axis.y;
Zaverage += axis.z;
rk28printk( "%s: ------------------mma7660_GetData axis = %d %d %d,average=%d %d %d--------------\n",
__func__, axis.x, axis.y, axis.z,Xaverage,Yaverage,Zaverage);
if((++RawDataNum)>=RawDataLength){
RawDataNum = 0;
axis.x = Xaverage/RawDataLength;
axis.y = Yaverage/RawDataLength;
axis.z = Zaverage/RawDataLength;
mma7660_report_value(client, &axis);
Xaverage = Yaverage = Zaverage = 0;
}
return 0;
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:60,代码来源:mma7660.c
示例10: rkusb_shell_log_write
/*
* return : = count ok, else failed
*/
static int rkusb_shell_log_write( struct log_buffer *p , char *buf, int count )
{
char *pt = buf;
struct tty_struct *tty_s = (struct tty_struct *)p->private_data;
int i = 0;
int flag = TTY_NORMAL;
buf[count] = 0;
rk28printk("%s:log=%s,buf=%s,count=%d,tty_s=0x%p\n" ,__func__ , p->name , pt , count , tty_s );
if( !tty_s ) {
return 0;
}
#if 0 /* add at pc tools */
if ( buf[count-1] != '\n' ) {
buf[count++] = '\n';
buf[count] = 0;
}
#endif
while( *pt && i < count ) {
tty_insert_flip_char(tty_s, *pt , flag);
pt++;
i++;
}
tty_flip_buffer_push( tty_s );
p->property |= LOG_PROT_MAYWRITE;
return count;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:31,代码来源:rk28_usb.c
示例11: rkusb_get_symbol
static int rkusb_get_symbol( struct rkusb_dev *dev )
{
switch ( DEV_FUNC(dev) ) {
case FUNC_GSYM_KERNEL:
return rkusb_get_kernel_symbols( dev );
case FUNC_GSYM_GETTASKS:
return rksub_get_sym_tasks( dev );
case FUNC_GSYM_GETTASKVM:
return rkusb_get_task_mm( dev );
case FUNC_GSYM_PROFILE:
{
char * buf = __rkusb_rwbuffer_start(dev);
PROFILE_INFO pe;
pe.size = sizeof( pe );
pe.npc = profile_check( buf );
pe.buf = (unsigned long)buf;
pe.now = ktime_to_ns( ktime_get() );
rk28printk("%s::profile n=%ld\n" , __func__ , pe.npc );
rkusb_normal_data_xfer_onetime( dev , &pe );
return 0;
}
default:
break;
}
return RKUSB_CB_FAILD;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:26,代码来源:rk28_usb.c
示例12: rkusb_get_kernel_symbols
static int rkusb_get_kernel_symbols( struct rkusb_dev *dev )
{
struct __kernel_symbol ks;
ks.size = sizeof( ks );
ks._stext = _stext;
ks._text = _text;
ks._etext = _etext;
ks._data = __data_start ; //_data;
ks._edata = _edata;
ks.__bss_start = __bss_start;
ks._end = _end;
ks.kallsyms_start = (unsigned char*)kallsyms_addresses;
ks.total_syms_size = (unsigned char*)__start_rodata - ks.kallsyms_start;
ks._kallsyms_num_syms = kallsyms_num_syms;
ks._kallsyms_addresses = (unsigned long*)kallsyms_addresses;
ks._kallsyms_markers = (unsigned long*)kallsyms_markers;
ks._kallsyms_names = (unsigned char*)kallsyms_names;
ks._kallsyms_token_index = (unsigned short*)kallsyms_token_index;
ks._kallsyms_token_table = (unsigned char*)kallsyms_token_table;
rkusb_normal_data_xfer_onetime( dev , &ks );
rk28printk("symbols addres=0x%p,names=0x%p,syms=0x%lx\n",
ks._kallsyms_addresses,ks._kallsyms_names,ks._kallsyms_num_syms);
return RKUSB_CB_OK_NONE;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:25,代码来源:rk28_usb.c
示例13: CaptouchHWInitial
// *******************************************************************************************
// Function Name: CaptouchHWInitial
// Description:
// This function is mainly used to initialize cap-touch controller to active state.
// Parameters: NULL
// Return value:
// return zero if success, otherwise return non zero value
// *******************************************************************************************
int CaptouchHWInitial(struct i2c_client *client)
{
u32 wXResolution=0,wYResolution=0;
u8 ucStep=0;
if (!IdentifyCapSensor(client))
{
rk28printk("%s IdentifyCapSensor error \r\n",__FUNCTION__);
printk("%s IdentifyCapSensor error \r\n",__FUNCTION__);
return false;
//goto resetagin;
}
#if 1
if (!GetFirmwareInformation (client))
{
rk28printk("%s GetFirmwareInformation error \r\n",__FUNCTION__);
printk("%s GetFirmwareInformation error \r\n",__FUNCTION__);
// goto resetagin;
}
if (!Get2DResolutions(client, &wXResolution, &wYResolution, &ucStep))
{
rk28printk("%s Get2DResolutions error \r\n",__FUNCTION__);
printk("%s Get2DResolutions error \r\n",__FUNCTION__);
// goto resetagin;
}
//no need to set interrupt mode because firmware has done that;note by robert
#if 0
if (!SetInterruptNotification(client, 0x01, 0x00))
{
rk28printk("%s SetInterruptNotification error \r\n",__FUNCTION__);
goto resetagin;
}
#endif
//note end
#endif
return true;
#if 0
resetagin:
if (!CaptouchReset(client))
rk28printk("CaptouchReset success \r\n");
mdelay(100);
#endif
// if (!CaptouchMode(client, 0x00))
// rk28printk("CaptouchMode success \r\n");
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:55,代码来源:ctp_it7250.c
示例14: Ctp_it7250_probe
static int Ctp_it7250_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
struct Ctp_it7250_data *Ctp_it7250;
Ctp_it7250_client = client;
rk28printk("+++++++ %s+++++++\n", __FUNCTION__);
Ctp_it7250 = kzalloc(sizeof(struct Ctp_it7250_data), GFP_KERNEL);
if (!Ctp_it7250)
{
rk28printk("[Ctp_it7250_probe]:alloc data failed.\n");
return -ENOMEM;
}
// INIT_WORK(&Ctp_it7250->irq_work, Ctp_it7250_irq_worker);
INIT_DELAYED_WORK(&Ctp_it7250->delaywork, Ctp_it7250_delaywork_func);
Ctp_it7250->client = client;
i2c_set_clientdata(client, Ctp_it7250);
if (!CaptouchHWInitial(client))
goto err_free_mem;
Ctp_it7250_init_irq(client);
ts_input_init(client);
// CTS_configure_pin(client);
#if 0
lp8725_lilo_en(2,0);
mdelay(100);
lp8725_lilo_en(2,1);
mdelay(100);
lp8725_set_lilo_vol(2,300);
mdelay(5);
#endif
//不是查询模式,不需要轮询
//schedule_delayed_work(&Ctp_it7250->delaywork,msecs_to_jiffies(50));
rk28printk("+++++++ %s+++++++\n", __FUNCTION__);
return 0;
err_free_mem:
kfree(Ctp_it7250);
return false;
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:46,代码来源:ctp_it7250.c
示例15: rkusb_write_shell_callback
static int rkusb_write_shell_callback( struct rkusb_dev *dev )
{
rk28printk("%s:actual len=%d\n" ,__func__ , dev->req_out->actual);
if( dev->log[DEV_LUN(dev)].setlog( &dev->log[DEV_LUN(dev)] , dev->req_out->buf , dev->req_out->actual )
>= dev->req_out->actual ) {
return RKUSB_CB_OK_CSW;
}
return RKUSB_CB_FAILD_CSW;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:10,代码来源:rk28_usb.c
示例16: rkusb_set_log
/*
* write sdram, just send command to shell.
*/
static int rkusb_set_log( struct rkusb_dev *dev )
{
rk28printk("%s:lun=%d,lba=0x%08x\n" ,__func__ , DEV_LUN(dev) , DEV_OFFSET(dev));
if( DEV_LUN(dev) < dev->luns && (dev->log[DEV_LUN(dev)].property & LOG_PROT_WRITE )
&& !__system_crashed() ) {
rkusb_normal_data_xfer( dev , rkusb_write_shell_callback );
return RKUSB_CB_OK_NONE;
}
return RKUSB_CB_FAILD;
}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:13,代码来源:rk28_usb.c
示例17: Ctp_it7250_suspend
static int Ctp_it7250_suspend(struct i2c_client *client, pm_message_t state)
{//pr_emerg("\n irq1=%d \n",irq1);
struct Ctp_it7250_data *Ctp_it7250 = (struct Ctp_it7250_data *)i2c_get_clientdata(client);
rk28printk("%s\n",__func__);
CaptouchMode(client, 2);
disable_irq(Ctp_it7250->irq);
return 0;
}
开发者ID:Astralix,项目名称:rk29_kernel_308,代码行数:11,代码来源:ctp_it7250.c
注:本文中的rk28printk函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论