Statistics
| Branch: | Tag: | Revision:

root / lib / usrp / mboard / usrp2_fw_common.h @ 5e455ca9

History | View | Annotate | Download (1.46 KB)

1
//
2
// Copyright 2010 Ettus Research LLC
3
//
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
//
17

    
18
#ifndef INCLUDED_USRP2_FW_COMMON_H
19
#define INCLUDED_USRP2_FW_COMMON_H
20

    
21
/*!
22
 * Structs and constants for usrp2 communication.
23
 * This header is shared by the firmware and host code.
24
 * Therefore, this header may only contain valid C code.
25
 */
26
#ifdef __cplusplus
27
extern "C" {
28
#endif
29

    
30
// udp ports for the usrp2 communication
31
// Dynamic and/or private ports: 49152–65535
32
#define USRP2_UDP_CTRL_PORT 49152
33
#define USRP2_UDP_DATA_PORT 49153
34

    
35
typedef enum{
36
    USRP2_CTRL_ID_HELLO
37
} usrp2_ctrl_id_t;
38

    
39
typedef struct{
40
    uint32_t id;
41
    uint32_t seq;
42
    union data{
43
        struct discovery_addrs{
44
            uint32_t ip_addr;
45
            uint8_t  mac_addr[6];
46
            uint8_t  _padding[2];
47
        };
48
    };
49
} usrp2_ctrl_data_t;
50

    
51
#ifdef __cplusplus
52
}
53
#endif
54

    
55
#endif /* INCLUDED_USRP2_FW_COMMON_H */