⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 headset_dut.c

📁 bluelab的一个很好的例程
💻 C
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2005

FILE NAME
    headset_dut.c

DESCRIPTION
	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 0


void 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -