summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-08 00:36:47 -0700
committerJosh Blum <josh@joshknows.com>2010-07-08 00:36:47 -0700
commitab617b492ed2dc47a814f8c01f60f7639ba633e7 (patch)
tree39083f383c5d39dc96e9e4716f811b6c077aea0f /host
parentc72bc56ba6d5b0457f03967a8f8d8e5602fdf14d (diff)
downloaduhd-ab617b492ed2dc47a814f8c01f60f7639ba633e7.tar.gz
uhd-ab617b492ed2dc47a814f8c01f60f7639ba633e7.tar.bz2
uhd-ab617b492ed2dc47a814f8c01f60f7639ba633e7.zip
usrp2: clean up fw common with nicer looking macro for stdint namespace
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/fw_common.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/host/lib/usrp/usrp2/fw_common.h b/host/lib/usrp/usrp2/fw_common.h
index f1761c5a6..fd728e393 100644
--- a/host/lib/usrp/usrp2/fw_common.h
+++ b/host/lib/usrp/usrp2/fw_common.h
@@ -24,12 +24,12 @@
* Therefore, this header may only contain valid C code.
*/
#ifdef __cplusplus
-#include <boost/cstdint.hpp>
-#define _SINS_ boost:://stdint namespace when in c++
+ #include <boost/cstdint.hpp>
+ #define __stdint(type) boost::type
extern "C" {
#else
-#include <stdint.h>
-#define _SINS_
+ #include <stdint.h>
+ #define __stdint(type) type
#endif
//defines the protocol version in this shared header
@@ -82,34 +82,35 @@ typedef enum{
} usrp2_clk_edge_t;
typedef struct{
- _SINS_ uint32_t proto_ver;
- _SINS_ uint32_t id;
- _SINS_ uint32_t seq;
+ __stdint(uint32_t) proto_ver;
+ __stdint(uint32_t) id;
+ __stdint(uint32_t) seq;
union{
- _SINS_ uint32_t ip_addr;
+ __stdint(uint32_t) ip_addr;
struct {
- _SINS_ uint8_t dev;
- _SINS_ uint8_t miso_edge;
- _SINS_ uint8_t mosi_edge;
- _SINS_ uint8_t readback;
- _SINS_ uint32_t data;
- _SINS_ uint8_t num_bits;
+ __stdint(uint8_t) dev;
+ __stdint(uint8_t) miso_edge;
+ __stdint(uint8_t) mosi_edge;
+ __stdint(uint8_t) readback;
+ __stdint(uint32_t) data;
+ __stdint(uint8_t) num_bits;
} spi_args;
struct {
- _SINS_ uint8_t addr;
- _SINS_ uint8_t bytes;
- _SINS_ uint8_t data[20];
+ __stdint(uint8_t) addr;
+ __stdint(uint8_t) bytes;
+ __stdint(uint8_t) data[20];
} i2c_args;
struct {
- _SINS_ uint32_t addr;
- _SINS_ uint32_t data;
- _SINS_ uint32_t addrhi;
- _SINS_ uint32_t datahi;
- _SINS_ uint8_t num_bytes; //1, 2, 4, 8
+ __stdint(uint32_t) addr;
+ __stdint(uint32_t) data;
+ __stdint(uint32_t) addrhi;
+ __stdint(uint32_t) datahi;
+ __stdint(uint8_t) num_bytes; //1, 2, 4, 8
} poke_args;
} data;
} usrp2_ctrl_data_t;
+#undef __stdint
#ifdef __cplusplus
}
#endif