Imported Upstream version 3.2.2
[debian/gnuradio] / usrp2 / host / include / usrp2 / copiers.h
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2008 Free Software Foundation, Inc.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef INCLUDED_USRP2_COPIERS_H
20 #define INCLUDED_USRP2_COPIERS_H
21
22 #include <complex>
23 #include <stdint.h>
24
25 namespace usrp2 {
26
27   // FIXME we may want to rework this, but this will get us on the air
28
29   /*
30    * ----------------------------------------------------------------
31    * Copy and convert from USRP2 wire format to host format
32    * ----------------------------------------------------------------
33    */
34
35   void 
36   copy_u2_16sc_to_host_16sc(size_t nitems,
37                             const uint32_t *items,
38                             std::complex<int16_t> *host_items);
39
40   void 
41   copy_u2_16sc_to_host_32fc(size_t nitems,
42                             const uint32_t *items,
43                             std::complex<float> *host_items);
44
45   /*
46    * ----------------------------------------------------------------
47    * Copy and convert from host format to USRP2 wire format
48    * ----------------------------------------------------------------
49    */
50
51   void 
52   copy_host_16sc_to_u2_16sc(size_t nitems,
53                             const std::complex<int16_t> *host_items,
54                             uint32_t *items);
55
56   void 
57   copy_host_32fc_to_u2_16sc(size_t nitems,
58                             const std::complex<float> *host_items,
59                             uint32_t *items);
60 }
61
62
63 #endif /* INCLUDED_USRP2_COPIERS_H */