• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: dfx resource id
15  * This file should be changed only infrequently and with great care.
16  */
17 #ifndef DFX_RESOURCE_ID
18 #define DFX_RESOURCE_ID
19 #include <stdint.h>
20 
21 typedef enum {
22     FAULT_DFX_MONITOR_REGISTER_FAIL,
23     FAULT_DFX_MONITOR_INIT_FAIL,
24     FAULT_DFX_DIAG_REGISTER_CMD_FAIL,
25     FAULT_DFX_DIAG_UNREGISTER_CMD_FAIL,
26 } dfx_fault_event_id_t; /* default event id */
27 
28 typedef enum {
29     DFX_EVENT_TEST = 0x1
30 } dfx_event_id_t; /* event id */
31 
32 typedef enum {
33     DFX_MSG_ID_DIAG_PKT, /* pkt msg,msg size is */
34     DFX_MSG_ID_SDT_MSG,
35     DFX_MSG_ID_BEAT_HEART,
36     DFX_MSG_ID_TRANSMIT_FILE,
37     DFX_MSG_ID_RESERVE_MAX   = 0x10, /* 0x10 user defined */
38 } dfx_msg_id_t; /* msg id */
39 
40 typedef enum {
41     DIAG_CHANNEL_ID_0,
42     DIAG_CHANNEL_ID_1,
43     DIAG_CHANNEL_ID_2,
44     DIAG_SUPPORT_CHANNEL_CNT,
45     DIAG_CHANNEL_ID_INVALID = 0xFF,
46 } diag_channel_id_t; /* diag : physical channel id */
47 
48 typedef uint8_t diag_addr;
49 
50 typedef enum {
51     DIAG_SAMPLE_DATA_TRANSMIT_ID_SCO_IN = 0xA,
52     DIAG_SAMPLE_DATA_TRANSMIT_ID_SCO_OUT = 0xB,
53     DIAG_SAMPLE_DATA_TRANSMIT_ID_SNOOP = 0xC,
54 } diag_sample_data_transmit_id_t;
55 
56 #define DIAG_SAMPLE_DATA_TRANSMIT_ID_COUNT 3
57 
58 #endif