2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __SOCKET_GLOBAL_H_INCLUDED__
16 #define __SOCKET_GLOBAL_H_INCLUDED__
18 #include "stream_buffer.h"
20 /* define the socket port direction */
22 SOCKET_PORT_DIRECTION_NULL,
23 SOCKET_PORT_DIRECTION_IN,
24 SOCKET_PORT_DIRECTION_OUT
25 } socket_port_direction_t;
27 /* pointer to the port's callout function */
28 typedef void (*socket_port_callout_fp)(void);
29 typedef struct socket_port_s socket_port_t;
30 typedef struct socket_s socket_t;
32 /* data structure of the socket port */
33 struct socket_port_s {
34 unsigned channel; /* the port entity */
35 socket_port_direction_t direction; /* the port direction */
36 socket_port_callout_fp callout; /* the port callout function */
38 socket_t *socket; /* point to the socket */
42 } buf; /* the buffer at the port */
45 /* data structure of the socket */
47 socket_port_t *in; /* the in-direction port */
48 socket_port_t *out; /* the out-direction port */
49 stream_buffer_t buf; /* the buffer between in-ports and out-ports */
52 #endif /* __SOCKET_GLOBAL_H_INCLUDED__ */