headset_dut.c

来自「BlueLab 3.5.2 单声道耳机源码」· C语言 代码 · 共 83 行

C
83
字号
/****************************************************************************Copyright (C) Cambridge Silicon Radio Ltd. 2005-2006Part of BlueLab 3.6.2-releaseFILE NAME    headset_dut.cDESCRIPTION	Place the headset into Device Under Test (DUT) mode    NOTES		*//****************************************************************************    Header files*/#include "headset_private.h"#include "headset_dut.h"#include <pio.h>#include <test.h>/****************************************************************************NAME        enterDutMode    DESCRIPTION  	This function is called to place the headset into DUT mode    RETURNS    void*/void enterDutMode(void){	ConnectionEnterDutMode();}#define TX_START_TEST_MODE_LO_FREQ  0#define TX_START_TEST_MODE_LEVEL    0#define TX_START_TEST_MODE_MOD_FREQ 0void enterTxContinuousTestMode ( void ) {    TestTxStart (TX_START_TEST_MODE_LO_FREQ,                  TX_START_TEST_MODE_LEVEL,                  TX_START_TEST_MODE_MOD_FREQ) ;}/****************************************************************************NAME        checkForDUTModeEntry    DESCRIPTION  	This function is called to determine if the headset should enter DUT mode.    RETURNS    void*/bool checkForDUTModeEntry(const hsTaskData* theHeadset){	if(theHeadset->input_PIO.dut_pio != INPUT_PIO_UNASSIGNED)	{		/* Enable the DUT mode PIO line */		PioSetDir(1 << theHeadset->input_PIO.dut_pio, 0);		/* If it's high, enter DUT mode */		if(PioGet() & (1 << theHeadset->input_PIO.dut_pio))		{			enterDutMode();			return TRUE;		}	}		return FALSE;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?