2 ******************************************************************************
4 * @file pios_udp_priv.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * Parts by Thorsten Klose (tk@midibox.org)
7 * @brief UDP private definitions.
8 * @see The GNU Public License (GPL) Version 3
10 *****************************************************************************/
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #ifndef PIOS_UDP_PRIV_H
28 #define PIOS_UDP_PRIV_H
33 #include <sys/socket.h>
34 #include <arpa/inet.h>
39 #include <netinet/in.h>
47 const struct pios_udp_cfg
*cfg
;
48 #if defined(PIOS_INCLUDE_FREERTOS)
55 struct sockaddr_in server
;
56 struct sockaddr_in client
;
57 uint32_t clientLength
;
60 pthread_mutex_t mutex
;
62 pios_com_callback tx_out_cb
;
63 uint32_t tx_out_context
;
64 pios_com_callback rx_in_cb
;
65 uint32_t rx_in_context
;
67 uint8_t rx_buffer
[PIOS_UDP_RX_BUFFER_SIZE
];
68 uint8_t tx_buffer
[PIOS_UDP_RX_BUFFER_SIZE
];
71 extern int32_t PIOS_UDP_Init(uint32_t *udp_id
, const struct pios_udp_cfg
*cfg
);
73 extern const struct pios_com_driver pios_udp_com_driver
;
75 #endif /* PIOS_UDP_PRIV_H */