main.c

来自「试验仪自检程序」· C语言 代码 · 共 55 行

C
55
字号
//=======================================================================
//  The information contained herein is the exclusive property of
//  Sunnnorth Technology Co. And shall not be distributed, reproduced,
//  or disclosed in whole in part without prior written permission.
//          (C) COPYRIGHT 2003  SUNNORTH TECHNOLOGY CO.
//                       ALL RIGHTS RESERVED
//  The entire notice above must be reproduced on all authorized copies.
//=======================================================================

//============================================================
//  工程名称: ex2_s480.spj
//  功能描述:  480格式播放
//  文件来源:《实验仪实验指导书》,"实验二十八	SACM_S480"  第106页
//  IDE环境:   SUNPLUS u'nSPTM  IDE 1.8.4
//
//  涉及的库:
//  组成文件:
//    	main.c isr.asm hardware.asm sacmv25.lib
//===============================================

//============================================================
// 文件名称:main.c
// 实现功能: S480格式播放
//============================================================

#include	"s480.h"

#define		Speech_1 		2
#define		DAC1			1
#define		DAC2			2
#define		Ramp_UpDn_Off	0
#define		Ramp_UpDn_On	3
#define		Auto			1

//============================================================= 
// 函数名称:   main()
// 功能描述:  S480格式播放
// 语法格式:  main()
//入口参数:     无
// 出口参数:    无
// 注意事项:    仅为用户模型
//=============================================================

main () 
{
	SACM_S480_Initial(1);
	SACM_S480_Play(Speech_1, DAC1+DAC2, Ramp_UpDn_On);	//放音
	while(SACM_S480_Status()&0x01) 
	{
		SACM_S480_ServiceLoop();
		F_ClearWatchdog();                              //清看门狗
	}
}

⌨️ 快捷键说明

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