sounder.c

来自「arm7平台上的定时器操作」· C语言 代码 · 共 50 行

C
50
字号
/******************************************************************************
 * File   Name: sounder.c		    									      *	
 * Create Time: 2007/08/10 													  *	
 * Description:	发生器实现发声												  *	
 * Author     :																  *
 * Version    :																  *
 *****************************************************************************/
 #define SOUNDER_ONOFF
 #ifdef  SOUNDER_ONOFF
/******************************
 *      Head File             *
 *****************************/
 #include "sounder.h"
 #include "config.h"
/******************************
 *     Global Variable        *
 *****************************/

/******************************
 *	   Const Segment          *
 *****************************/

/******************************
 *      Function  Implement   *
 *****************************/
/*******************************************************************************
Function Name: void sounder_init(void) 										   *
Function Description :  相关初始化        									   *	
*******************************************************************************/
void SOUNDERInit(void)
{
 	PINSEL1 &= SOUNDER_PINSEL;        //管脚功能选择寄存器1的16、17位置0,功能选择为GPIO P0.24
 	IO0DIR |= SOUNDER; 	
}

void SOUNDEROn(void)
{
	IO0CLR = SOUNDER;
}

void SOUNDEROff(void)
{
	IO0SET = SOUNDER;
}


 #endif
/*******************************************************************************
 *                        The end of the entire file			               *
 ******************************************************************************/

⌨️ 快捷键说明

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