?? spclidg.h
字號(hào):
/*-------------------------------------------------------------------------*
* *
* THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY *
* INFORMATION. IF PUBLICATION OCCURS, THE FOLLOWING NOTICE APPLIES: *
* "COPYRIGHT 2002 MIKET DSP SOLUTIONS, ALL RIGHTS RESERVED" *
* *
*-------------------------------------------------------------------------*/
#include "spdefs.h"
/*--------------------- local defs ----------------------------------------*/
/*--------------------- public vars ---------------------------------------*/
typedef struct SPCLIDG_tCfg {
/* how many seizure (alternating 1/0 shall be applied.
you can use 32767 for level test purposes
(that number will result in about 27 sec of transmision)
default: 300 (for on-hook, 0 for off-hook).
*/
S16 sSeizureBits;
/* default: 180 (for on-hook, 80 for off-hook) */
S16 sMarkBits;
/* 0, or less than 10. those marks will be inserted between each byte of
the msg.
default: 0 */
S16 sInterwordMarkBits;
/* amplitude of the sine wave, in linear format.
it may need adjustments for the given curcuitry for
both on-hook and off-hook transmission conditions.
as per TR-NWT-000030, the level should be -13.5 dBm +-1.5
dB at the point of application to the loop facility
into a standard 900 Ohm test termination.
default: 1220
*/
S16 sLevel;
} SPCLIDG_tCfg;
typedef struct SPCLIDG_tDb {
U16 auMsg[128]; // packed, 1st byte into msb
S16 sBytes;
S16 sState;
S16 sBit;
S16 sBitNo;
S16 sByteNo;
S16 sSample;
S16 sPhase;
S16 sChar;
S16 sCS;
SPCLIDG_tCfg Cfg;
} SPCLIDG_tDb;
extern SPCLIDG_tDb SPCLIDG_aDb[];
// return codes for sp_clidg()
#define SPCLIDG_IDLE ((S16)0)
#define SPCLIDG_ACTIVE ((S16)1)
#define SPCLIDG_DONE ((S16)2)
/*--------------------- local vars ----------------------------------------*/
/*--------------------- local functions -----------------------------------*/
/*--------------------- public functions ---------------------------------*/
/* operations:
- init db: sp_clidg_init(..)
- config it if needed.
- when you need to start,
- write the msg with 1st byte into msb, 2nd into lsb, etc,
into the database, starting at the base address.
there is no need to calculate CS (it will done automatically),
this (last) byte can be garbage.
- you may need to (re)config cligd gen if you switch
between on-hook and off-hook.
- call sp_clidg_start(...);
- calling sp_clidg(...).
this function may be called always:
it will return immediately if clid gen not active,
the buffer content will not be modified.
if active, the buffer content will be replaced with signal to be tx-ed.
the function returns status (see defs above).
*/
// called during system init
extern void sp_clidg_init (void *p_db);
// called after _init
extern void sp_clidg_cfg (void *p_db, void *p_cfg);
// called after writing the message into pDb->auMsg
extern void sp_clidg_start (void *p_db);
// run it, returns one of the codes (see above)
extern S16 sp_clidg (void *p_db, S16 *psTo);
/*-------------------------------------------------------------------------*/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -