4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Arijit Sen <arijit.sen@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
28 CMUX_MODE_BASIC = 0x00,
33 typedef struct cmux_channel tcore_cmux_channel;
35 /* Global MUX Object */
36 typedef struct cmux_obj tcore_cmux_object;
38 /* CMUX setup complete callback prototype */
39 typedef void (*cmux_setup_complete_cb_func) (gpointer user_data);
41 /* CMUX setup callback prototype */
42 typedef void (*cmux_setup_cb_func) (int channel_id, TcoreHal *hal,
45 /* CMUX Channel close callback prototype */
46 typedef void (*cmux_channel_close_cb_func) (TcoreHal *hal, gpointer user_data);
48 /* CMUX initialization - Internal and Kernel */
49 TReturn tcore_cmux_init(TcoreHal *phy_hal, unsigned int frame_size,
50 TcorePendingResponseCallback resp_cb, void *resp_cb_data);
52 /* Setup Internal CMUX */
53 TReturn tcore_cmux_setup_internal_mux(tcore_cmux_mode mode,
54 int max_channels, unsigned int cmux_buf_size, TcoreHal *phy_hal,
55 cmux_setup_cb_func channel_setup_cb, gpointer channel_setup_user_data,
56 cmux_setup_complete_cb_func setup_complete_cb, gpointer setup_complete_user_data);
59 void tcore_cmux_close(TcoreHal *phy_hal,
60 cmux_channel_close_cb_func channel_close_cb, gpointer channel_close_user_data);
62 /* HAL Receive for Internal CMUX */
63 void tcore_cmux_rcv_from_hal(TcoreHal *hal, unsigned char *data, size_t length);
65 #endif /* __MUX_H__ */