blob: 96399f1a5df45f6144a087787b2b01f139301c4e [file] [log] [blame]
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2001
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* nccci_if.h
*
* Project:
* --------
* UMOLYE
*
* Description:
* ------------
* Header file of NCCCI.
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef __NCCCI_IF_H__
#define __NCCCI_IF_H__
#include "ccci_if.h"
#define NCCCI_GET_TX_CH(ch) nccci_get_tx_ch(ch)
#define NCCCI_GET_RX_CH(ch) nccci_get_rx_ch(ch)
#define CCCI_PAYLOAD_SIZE (CCCI_MTU_SIZE - sizeof(CCCI_BUFF_T))
typedef void (*NCCCI_CALLBACK)();
typedef void (*NCCCI_CALLBACK_WITH_CONTEXT)(void* user_context);
typedef struct{
module_type module_id;
msg_type msg_id;
sap_type sap;
} NCCCI_ILM_REGISTRATION_STRUCT;
//define NCCCI IOCTL ENUM
typedef enum{
NCCCI_IOCTL_NONE = 0,
NCCCI_IOCTL_SET_DL_LOG,
NCCCI_IOCTL_SET_UL_LOG,
NCCCI_IOCTL_SET_DL_CALLBACK,
NCCCI_IOCTL_SET_UL_CALLBACK,
NCCCI_IOCTL_SET_DL_CALLBACK_WITH_CONTEXT,
NCCCI_IOCTL_SET_UL_CALLBACK_WITH_CONTEXT,
NCCCI_IOCTL_SET_DL_DONE_ILM,
NCCCI_IOCTL_SET_UL_DONE_ILM,
NCCCI_IOCTL_SET_FLAG,
} NCCCI_IOCTL_ENUM;
typedef enum{
NCCCI_IOCTL_LOG_NONE = 0,
NCCCI_IOCTL_LOG_0B,
NCCCI_IOCTL_LOG_CCCI_HDR_ONLY,
NCCCI_IOCTL_LOG_16B,
NCCCI_IOCTL_LOG_32B,
NCCCI_IOCTL_LOG_64B,
NCCCI_IOCTL_LOG_MAX = NCCCI_IOCTL_LOG_64B,
} NCCCI_IOCTL_LOG_ENUM;
typedef enum{
NCCCI_IOCTL_MODE_NONE = 0,
NCCCI_IOCTL_MODE_BLOCKING,
NCCCI_IOCTL_MODE_NONBLOCKING,
NCCCI_IOCTL_MODE_MAX = NCCCI_IOCTL_MODE_NONBLOCKING,
} NCCCI_IOCTL_MODE_ENUM;
//define NCCCI IOCTL ENUM
kal_int32 nccci_open(CCCI_CHANNEL_T channel);
kal_int32 nccci_ioctl(CCCI_CHANNEL_T channel, NCCCI_IOCTL_ENUM ioctl_type, ...);
kal_int32 nccci_write(CCCI_CHANNEL_T channel, void *buff, kal_int32 write_len);
void ccci_write_done(CCCI_CHANNEL_T channel, ccci_io_request_t* io_request);
void ccci_read_done(CCCI_CHANNEL_T channel, ccci_io_request_t* io_request);
kal_int32 nccci_read(CCCI_CHANNEL_T channel, void *buff, kal_int32 buffer_size);
kal_int32 nccci_close(CCCI_CHANNEL_T channel);
CCCI_CHANNEL_T nccci_get_tx_ch(CCCI_CHANNEL_T nccci_ch);
CCCI_CHANNEL_T nccci_get_rx_ch(CCCI_CHANNEL_T nccci_ch);
kal_bool nccci_check_channel_exist(CCCI_CHANNEL_T channel);
#endif /* __NCCCI_IF_H__ */