comparison src/cs/services/tty/tty_i.h @ 0:945cf7f506b2

src/cs: chipsetsw import from tcs211-fcmodem binary blobs and LCD demo files have been excluded, all line endings are LF only
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 22:50:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:945cf7f506b2
1 /**
2 * @file tty_i.h
3 *
4 * Internal definitions for TTY.
5 *
6 * @author Frederic Turgis (f-turgis@ti.com) & Gerard Cauvy (g-cauvy@ti.com)
7 * @version 0.1
8 */
9
10 /*
11 * History:
12 *
13 * Date Modification
14 * ------------------------------------
15 * 01/27/2003 Create
16 *
17 * (C) Copyright 2003 by Texas Instruments Incorporated, All Rights Reserved
18 */
19
20 #ifndef __TTY_I_H_
21 #define __TTY_I_H_
22
23
24 #include "rv/rv_general.h"
25 #include "rvm/rvm_gen.h"
26 #include "rvf/rvf_api.h"
27 #include "rvm/rvm_use_id_list.h"
28
29 /* TTY entity (Background Task) is HIGHLY linked to the Audio entity. */
30 #include "audio/audio_api.h"
31
32 /* Macro definition for sending trace */
33 #define TTY_SEND_TRACE(text,level) rvf_send_trace(text, sizeof(text)-1, NULL_PARAM, level, TTY_USE_ID )
34
35 /* Events Masks for TTY SWE. */
36 #define TTY_DATA_EVENT_MASK (EVENT_MASK(RVF_APPL_EVT_0))
37 #define TTY_INIT_EVENT_MASK (EVENT_MASK(RVF_APPL_EVT_1))
38 #define TTY_EXIT_EVENT_MASK (EVENT_MASK(RVF_APPL_EVT_2))
39
40 /* TTY Control Block. */
41 typedef struct
42 {
43 /**
44 * Return path of the input result (should be the return path to access
45 * to the SWE we are communicating with).
46 */
47 T_RV_RETURN_PATH return_path;
48
49 /** Pointer to the error function */
50 T_RVM_RETURN (*error_ft)(T_RVM_NAME swe_name,
51 T_RVM_RETURN error_cause,
52 T_RVM_ERROR_TYPE error_type,
53 T_RVM_STRING error_msg);
54
55 /** Mem bank id. */
56 T_RVF_MB_ID prim_mb_id;
57
58 /** Address ID of TTY SWE */
59 T_RVF_G_ADDR_ID addr_id;
60
61 UINT8 state;
62
63 } T_TTY_ENV_CTRL_BLK;
64
65 /* Internal messages definition */
66 #define TTY_START_REQ (0x00F0 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
67
68 typedef struct
69 {
70 T_RV_HDR os_hdr;
71 T_RV_RETURN return_path;
72 } T_TTY_START;
73
74 #define TTY_STOP_REQ (0x00F1 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
75
76 typedef struct
77 {
78 T_RV_HDR os_hdr;
79 T_RV_RETURN return_path;
80 } T_TTY_STOP;
81
82 /* Define all the state of the TTY State Machine */
83 #define TTY_IDLE (1)
84 #define TTY_WAIT_START_CON (2)
85 #define TTY_WAIT_STOP_COMMAND (3)
86 #define TTY_WAIT_START_CON_TO_STOP (4)
87 #define TTY_WAIT_STOP_CON (5)
88
89 #endif /* __TTY_I_H_ */