blob: 93e39ef0a3f070188950c357d51247fd2d93cfeb [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*******************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2001
8*
9*******************************************************************************/
10
11/*******************************************************************************
12 *
13 * Filename:
14 * ---------
15 * ctm_modem.h
16 *
17 * Project:
18 * --------
19 *
20 *
21 * Description:
22 * ------------
23 *
24 *
25 * Author:
26 * -------
27 *
28 *
29 *==============================================================================
30 * HISTORY
31 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
32 *------------------------------------------------------------------------------
33 * removed!
34 * removed!
35 * removed!
36 *
37 * removed!
38 * removed!
39 * removed!
40 *
41 * removed!
42 * removed!
43 * removed!
44 *
45 * removed!
46 * removed!
47 * removed!
48 *
49 *------------------------------------------------------------------------------
50 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
51 *==============================================================================
52 *******************************************************************************/
53
54#ifdef __CTM_SUPPORT__
55
56#ifndef __CTM_MODEM_H
57#define __CTM_MODEM_H
58
59uint32 ctm_modem_mem_req(void);
60void ctm_modem_init(uint8 *buf, uint32 buf_len, CTM_Param *ctm_param);
61uint16 ctm_modem_get_flags(void);
62
63void baudot_demod(const uint16 *pcm_in_buf, uint16 *ctmFlags, uint8 *utf8_code);
64void ctm_receiver(const uint16 *pcm_in_buf, uint8 bfi, uint16 *ctmFlags, uint8 *utf8_code);
65void baudot_mod(uint8 utf8_code, uint16 *pcm_in_buf,uint16 *ctmFlags);
66void ctm_transmitter(uint8 utf8_code, uint16 *pcm_in_buf,uint16 *ctmFlags);
67void baudot_demod_reset(void);
68
69//*** CMF(CTM Modem Flags)
70
71// Baudot Demodulator
72#define CMF_BAUDOT_IN_DETECTED 0x1
73#define CMF_BAUDOT_IN_CHAR 0x2
74
75// CTM Receiver
76#define CMF_CTM_RX_EARLY_MUTE 0x4
77#define CMF_CTM_RX_DETECTED 0x8
78#define CMF_CTM_RX_CHAR 0x10
79
80// Baudot Modulator
81#define CMF_BAUDOT_OUT_BITS_READY 0x40
82#define CMF_BAUDOT_OUT_NEAR_EMPTY 0x80
83
84// CTM Transmitter
85#define CMF_CTM_TX_BITS_READY 0x100
86#define CMF_CTM_TX_NEAR_EMPTY 0x200
87
88#endif // __CTM_MODEM_H
89
90#endif // __CTM_SUPPORT__