comparison gsm-fw/services/etm/etm_api.h @ 164:d78219c43fbf

gsm-fw/services/etm: initial import from the Leonardo semi-src
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 18 Nov 2013 06:39:44 +0000
parents
children 9dbf3248a197
comparison
equal deleted inserted replaced
163:5e0e41cd7c9f 164:d78219c43fbf
1 /********************************************************************************
2 * Enhanced TestMode (ETM)
3 * @file etm_api.c
4 *
5 * API for ETM SWE.
6 *
7 * @author Kim T. Peteren (ktp@ti.com)
8 * @version 0.1
9 *
10
11 *
12 * History:
13 *
14 * Date Modification
15 * ------------------------------------
16 * 11/06/2003 Creation
17 *
18 * (C) Copyright 2003 by Texas Instruments Incorporated, All Rights Reserved
19 *********************************************************************************/
20
21
22 #ifndef __ETM_API_H_
23 #define __ETM_API_H_
24
25 #include "etm/etm_misc.h"
26 #include "etm/etm_messages_i.h"
27
28 /******************************************************************************
29 * ETM Packet
30 *****************************************************************************/
31
32 typedef struct {
33 T_RV_HDR header;
34 char size;
35 uint8 data[255];
36
37 } T_ETM_MAIL;
38
39
40 /******************************************************************************
41 * Messages
42 *****************************************************************************/
43
44 /* Event return to entity */
45 #define ETM_DATA_READY (ETM_MESSAGES_OFFSET | 0x010)
46 typedef struct
47 {
48 T_RV_HDR header;
49 char data[255];
50
51 } T_ETM_DATA_READY;
52
53
54 /******************************************************************************
55 * Prototypes
56 *****************************************************************************/
57
58 int etm_register(char name[], int mid, int task_id, T_RVF_ADDR_ID addr_id, ETM_CALLBACK_FUNC callback);
59 int etm_unregister(char name[], int mid, int task_id, T_RVF_ADDR_ID addr_id, ETM_CALLBACK_FUNC callback);
60
61 int etm_pkt_send(T_ETM_PKT *pkt);
62 int etm_pkt_putdata(T_ETM_PKT *pkt, const void *buf, int size);
63
64 int etm_get8(void *buf);
65 int etm_get16(void *buf);
66 int etm_get32(void *buf);
67
68 int etm_pkt_put8(T_ETM_PKT *p, int value);
69 int etm_pkt_put16(T_ETM_PKT *p, int value);
70 int etm_pkt_put32(T_ETM_PKT *p, int value);
71
72 #endif /* __ETM_API_H_ */