找回密码
 立即注册

使用微信账号登录

只需一步,快速开始

qcc3056 aux模拟输入始终使能

2021-11-16 21:55| 发布者: 213465982| 查看: 2184| 评论: 1

摘要: 新手玩家,入门教程,记录学习,qcc3056的模拟输入是有检测脚的(低电平有效),本教程让模拟输入一直处于激活状态,当然也可以硬件将检测脚接地。教程简单,实际删除两处代码即可。1. 新建宏定义(非必须)2. 屏蔽a ...
新手玩家,入门教程,记录学习,qcc3056的模拟输入是有检测脚的(低电平有效),本教程让模拟输入一直处于激活状态,当然也可以硬件将检测脚接地。教程简单,实际删除两处代码即可。

测试平台大概说明下,
mde2.6
adk toolkit 1.2.9.25
ADK-21.1-CS-r00073.2

1. 新建宏定义(非必须)

2. 屏蔽aux输入刷新检测

void WiredAudioDetect_HandleMessage(Task task, MessageId id, Message message)
{
    UNUSED(task);
    UNUSED(message);

    switch (id)
    {
        case MESSAGE_PIO_CHANGED:
        { 
            /* Process PIO events from PIO monitor only when monitoring is enabled */ 
            if(IsPioMonitorEventsAllowed())
            {
               #ifdef WIRED_ALWAYS
               if(wiredAudioChanged((const MessagePioChanged *)message)) 
                  WiredAudioSource_UpdateClient();
                #endif
            }
        }
        break;

        default:
        break;
    }
}

3. 默认开启aux激活状态

bool WiredAudioDetect_StartMonitoring(void)
{
    bool status = FALSE;
    wiredAudioSourceTaskData *sp = WiredAudioSourceGetTaskData();
    
    if(Line_In_Ready())
    {
        sp->allow_pio_monitor_events = TRUE;
        status = TRUE;

        /* A wired device already plugged in */
        #ifdef WIRED_ALWAYS
        //if(IsLineInAvailable(sp))
        #endif
        {
           /* Set the mask correctly */
           wiredAudioDetect_SetMask(WIRED_AUDIO_SOURCE_LINE_IN);

           /* Send a WIRED_AUDIO_CONNECT_IND message to clients */
           WiredAudioSource_SendStatusMessage(TRUE,audio_source_line_in);
        }
    }
    
    return status;
}



2

路过

雷人

握手

鲜花

鸡蛋

刚表态过的朋友 (2 人)

相关阅读

发表评论

最新评论

引用 呐咿晔 2022-1-4 14:38
学习了,谢谢!

查看全部评论(1)

小黑屋|手机版|我爱蓝牙网 - 52Bluetooth

GMT+8, 2024-3-28 22:53 , Processed in 0.116425 second(s), 17 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

返回顶部