📄 tone_internal.inc
字号:
// ----------------------------------------------------------------------------
// Copyright (c) 2008 Semiconductor Components Industries, LLC
// (d/b/a ON Semiconductor). All Rights Reserved.
//
// This code is the property of ON Semiconductor and may not be redistributed
// in any form without prior written permission from ON Semiconductor. The
// terms of use and warranty for this code are covered by contractual
// agreements between ON Semiconductor and the licensee.
// ----------------------------------------------------------------------------
// Tone_internal.inc
// - Internal definitions for tone generation application
// - A 2 kHz tone is toggled on and off every time the timer expires.
// The 2 kHz tone is mixed with the pass-through audio.
// ----------------------------------------------------------------------------
// $Revision: 1.16 $
// $Date: 2008/10/29 18:00:25 $
// ----------------------------------------------------------------------------
#ifndef TONE_INTERNAL_INC_INCLUDED
#define TONE_INTERNAL_INC_INCLUDED
// ----------------------------------------------------------------------------
// Name: SIZE_TONE_TABLE
// Description: The size of the table which is used to represent the
// 2 kHz sinusoid signal.
// Type: 16-bit integer
// Default Value: 16
// Range: 0 up to 2048 or the amount of free high X memory
// available
// ----------------------------------------------------------------------------
#define SIZE_TONE_TABLE 16
// Used to set the state of the tone as off. Used by YL_TONE_STATUS.
#define TONE_OFF 0x0
// Used to set the state of the tone as on. Used by YL_TONE_STATUS.
#define TONE_ON 0x1
//-----------------------------------------------------------------------------
// Algorithm Internal Variables
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Name: YL_TONE_STATUS
// Description: Tone on/off flag
// Data format: 16-bit integer
// Size: 1 word
// Default value: TONE_OFF
// Range: TONE_OFF, TONE_ON
// Restrictions: None
// Initialization method: Initialized in Tone_Initialize
//-----------------------------------------------------------------------------
.extern YL_TONE_STATUS
//-----------------------------------------------------------------------------
// Name: XL_TONE_TABLE_PTR
// Description: Store the pointer to tone table
// Data format: 16-bit binary
// Size: 1 word
// Default value: XH_TONE_TABLE
// Range: XH_TONE_TABLE to XH_TONE_TABLE+SIZE_TONE_TABLE-1
// Restrictions: None
// Initialization method: Initialized in Tone_Initialize
//-----------------------------------------------------------------------------
.extern XL_TONE_TABLE_PTR
//-----------------------------------------------------------------------------
// Name: XH_TONE_TABLE
// Description: Starting address of a table that stores the value of a 2 kHz
// sinusoid
// Data format: 16-bit fractional
// Size: SIZE_TONE_TABLE words
// Default value: SIZE_TONE_TABLE samples of 2 cycles of a sine wave
// (16 samples set as default)
// Range: 0x0000 to 0xF6F3
// Restrictions: None
// Initialization method: Initialized when the application is loaded into
// memory
//-----------------------------------------------------------------------------
.extern XH_TONE_TABLE
#endif // TONE_INTERNAL_INC_INCLUDED
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -