页次: 1
是啊,ADC的值一直出不来,按键按下去,电压确定是变化的,
static void rocker_data_task(void *p_arg)
{
__s32 ret, times, ad_data, vaild_num, sum;
__s32 count = 0,num=0;
__ev_rk_msg_t drv_rk_msg;
static int x1_key_down_flag = 0, x1_key_pad = 0;
static int x2_key_down_flag = 0, x2_key_pad = 0;
static int y1_key_down_flag = 0, y1_key_pad = 0;
static int y2_key_down_flag = 0, y2_key_pad = 0;
__s32 databuf[8];
__u32 adchannel_set=RK_CHANNEL_X1;
__s32 key_type;
key_type=get_key_type();
RK_ClearFifo();
RK_SelectChannel(RK_CHANNEL_X1);
__msg("\n\add_1_key_function_init\n\n");
__msg("\n\n~~rocker_data_task~~~\n\n");
while(1)
{
if(esKRNL_TDelReq(OS_PRIO_SELF) == OS_TASK_DEL_REQ)
{
//杀线程;
esKRNL_TDel(OS_PRIO_SELF);
}
switch(RK_CHANNEL_X1)
{
case RK_CHANNEL_X1:
{
__msg("\n\nRK_CHANNEL_X1 = ~\n\n");
// add_1_key_function_init();
RK_SelectChannel(RK_CHANNEL_X1);
ret = RK_QueryIntPending();
__msg("\n\n~~rocker_data_task RK_CHANNEL_X1 = %d~~~\n\n",ret);
// add_1_key_function_exit();
if(ret & RK_DATA_PENDING)
ret 一直打印为0
页次: 1