blob: 96399f1a5df45f6144a087787b2b01f139301c4e [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 * nccci_if.h
16 *
17 * Project:
18 * --------
19 * UMOLYE
20 *
21 * Description:
22 * ------------
23 * Header file of NCCCI.
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 *------------------------------------------------------------------------------
35 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
36 *============================================================================
37 ****************************************************************************/
38
39#ifndef __NCCCI_IF_H__
40#define __NCCCI_IF_H__
41#include "ccci_if.h"
42
43#define NCCCI_GET_TX_CH(ch) nccci_get_tx_ch(ch)
44#define NCCCI_GET_RX_CH(ch) nccci_get_rx_ch(ch)
45
46#define CCCI_PAYLOAD_SIZE (CCCI_MTU_SIZE - sizeof(CCCI_BUFF_T))
47
48typedef void (*NCCCI_CALLBACK)();
49typedef void (*NCCCI_CALLBACK_WITH_CONTEXT)(void* user_context);
50
51typedef struct{
52 module_type module_id;
53 msg_type msg_id;
54 sap_type sap;
55} NCCCI_ILM_REGISTRATION_STRUCT;
56
57//define NCCCI IOCTL ENUM
58typedef enum{
59 NCCCI_IOCTL_NONE = 0,
60 NCCCI_IOCTL_SET_DL_LOG,
61 NCCCI_IOCTL_SET_UL_LOG,
62 NCCCI_IOCTL_SET_DL_CALLBACK,
63 NCCCI_IOCTL_SET_UL_CALLBACK,
64 NCCCI_IOCTL_SET_DL_CALLBACK_WITH_CONTEXT,
65 NCCCI_IOCTL_SET_UL_CALLBACK_WITH_CONTEXT,
66 NCCCI_IOCTL_SET_DL_DONE_ILM,
67 NCCCI_IOCTL_SET_UL_DONE_ILM,
68 NCCCI_IOCTL_SET_FLAG,
69} NCCCI_IOCTL_ENUM;
70
71typedef enum{
72 NCCCI_IOCTL_LOG_NONE = 0,
73 NCCCI_IOCTL_LOG_0B,
74 NCCCI_IOCTL_LOG_CCCI_HDR_ONLY,
75 NCCCI_IOCTL_LOG_16B,
76 NCCCI_IOCTL_LOG_32B,
77 NCCCI_IOCTL_LOG_64B,
78 NCCCI_IOCTL_LOG_MAX = NCCCI_IOCTL_LOG_64B,
79} NCCCI_IOCTL_LOG_ENUM;
80
81typedef enum{
82 NCCCI_IOCTL_MODE_NONE = 0,
83 NCCCI_IOCTL_MODE_BLOCKING,
84 NCCCI_IOCTL_MODE_NONBLOCKING,
85 NCCCI_IOCTL_MODE_MAX = NCCCI_IOCTL_MODE_NONBLOCKING,
86} NCCCI_IOCTL_MODE_ENUM;
87//define NCCCI IOCTL ENUM
88
89kal_int32 nccci_open(CCCI_CHANNEL_T channel);
90kal_int32 nccci_ioctl(CCCI_CHANNEL_T channel, NCCCI_IOCTL_ENUM ioctl_type, ...);
91kal_int32 nccci_write(CCCI_CHANNEL_T channel, void *buff, kal_int32 write_len);
92void ccci_write_done(CCCI_CHANNEL_T channel, ccci_io_request_t* io_request);
93void ccci_read_done(CCCI_CHANNEL_T channel, ccci_io_request_t* io_request);
94kal_int32 nccci_read(CCCI_CHANNEL_T channel, void *buff, kal_int32 buffer_size);
95kal_int32 nccci_close(CCCI_CHANNEL_T channel);
96
97CCCI_CHANNEL_T nccci_get_tx_ch(CCCI_CHANNEL_T nccci_ch);
98CCCI_CHANNEL_T nccci_get_rx_ch(CCCI_CHANNEL_T nccci_ch);
99
100kal_bool nccci_check_channel_exist(CCCI_CHANNEL_T channel);
101#endif /* __NCCCI_IF_H__ */
102
103