GNU Radio's TEST Package

redpitaya_common.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2015 Pavel Demin
4 * Copyright 2015 Dimitri Stolnikov <horiz0n@gmx.net>
5 *
6 * GNU Radio is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3, or (at your option)
9 * any later version.
10 *
11 * GNU Radio is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Radio; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street,
19 * Boston, MA 02110-1301, USA.
20 */
21#ifndef REDPITAYA_COMMON_H
22#define REDPITAYA_COMMON_H
23
24#include <stdint.h>
25
26#if defined(_WIN32)
27#include <winsock2.h>
28#include <ws2tcpip.h>
29#include <windows.h>
30#define INVSOC INVALID_SOCKET
31#else
32#include <unistd.h>
33#include <fcntl.h>
34#include <sys/types.h>
35#include <sys/ioctl.h>
36#include <sys/socket.h>
37#include <sys/select.h>
38#include <netinet/in.h>
39#include <arpa/inet.h>
40#ifndef SOCKET
41#define SOCKET int
42#define INVSOC (-1)
43#endif
44#endif
45
46#if defined(__APPLE__) || defined(__MACH__)
47#ifndef MSG_NOSIGNAL
48#define MSG_NOSIGNAL SO_NOSIGPIPE
49#endif
50#endif
51
52 void redpitaya_send_command( SOCKET socket, uint32_t command );
53
54#endif // REDPITAYA_COMMON_H
redpitaya_send_command
void redpitaya_send_command(SOCKET socket, uint32_t command)
SOCKET
#define SOCKET
Definition: redpitaya_common.h:41