• 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: diag channel
15  * This file should be changed only infrequently and with great care.
16  */
17 #ifndef DIAG_CHANNEL_ITEM_H
18 #define DIAG_CHANNEL_ITEM_H
19 
20 #include "errcode.h"
21 #include "diag_channel.h"
22 #include "dfx_write_interface.h"
23 
24 typedef struct {
25     uint32_t init : 1;
26     uint32_t pad : 31;
27     uint32_t name_flag;
28     uint8_t *rx_buf;
29     uint32_t au_id;
30     uint16_t rx_buf_len;
31     uint16_t rx_buf_pos;
32     uint16_t using_size;
33     uint16_t min_pkt_size;
34     bool rx_buf_is_using;
35     uint8_t hso_addr;
36     uint8_t pad1[2];
37     diag_channel_tx_hook tx_hook;
38     diag_channel_notify_hook notify_hook;
39 } diag_channel_item_t;
40 
41 diag_channel_item_t *diag_chan_idx_2_item(diag_channel_id_t id);
42 diag_channel_item_t *zdiag_dst_2_chan(uint8_t addr);
43 
44 #endif
45