From 18defbd9d40a4c11a33025c8684f48fe51f102c5 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 11 Jan 2011 19:44:46 -0800 Subject: uhd: add msvc stdint.h so we can use stdints typedefs normally like, fix in fw_common.h --- host/lib/usrp/usrp2/fw_common.h | 48 +++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/usrp2/fw_common.h b/host/lib/usrp/usrp2/fw_common.h index 67ba90658..a22f805e1 100644 --- a/host/lib/usrp/usrp2/fw_common.h +++ b/host/lib/usrp/usrp2/fw_common.h @@ -18,18 +18,15 @@ #ifndef INCLUDED_USRP2_FW_COMMON_H #define INCLUDED_USRP2_FW_COMMON_H +#include + /*! * Structs and constants for usrp2 communication. * This header is shared by the firmware and host code. * Therefore, this header may only contain valid C code. */ #ifdef __cplusplus - #include - #define __stdint(type) boost::type extern "C" { -#else - #include - #define __stdint(type) type #endif //fpga and firmware compatibility numbers @@ -106,39 +103,38 @@ typedef enum{ } usrp2_clk_edge_t; typedef struct{ - __stdint(uint32_t) proto_ver; - __stdint(uint32_t) id; - __stdint(uint32_t) seq; + uint32_t proto_ver; + uint32_t id; + uint32_t seq; union{ - __stdint(uint32_t) ip_addr; + uint32_t ip_addr; struct { - __stdint(uint32_t) dev; - __stdint(uint32_t) data; - __stdint(uint8_t) miso_edge; - __stdint(uint8_t) mosi_edge; - __stdint(uint8_t) num_bits; - __stdint(uint8_t) readback; + uint32_t dev; + uint32_t data; + uint8_t miso_edge; + uint8_t mosi_edge; + uint8_t num_bits; + uint8_t readback; } spi_args; struct { - __stdint(uint8_t) addr; - __stdint(uint8_t) bytes; - __stdint(uint8_t) data[20]; + uint8_t addr; + uint8_t bytes; + uint8_t data[20]; } i2c_args; struct { - __stdint(uint32_t) addr; - __stdint(uint32_t) data; - __stdint(uint32_t) _pad[2]; - __stdint(uint8_t) num_bytes; //1, 2, 4 + uint32_t addr; + uint32_t data; + uint32_t _pad[2]; + uint8_t num_bytes; //1, 2, 4 } poke_args; struct { - __stdint(uint8_t) dev; - __stdint(uint8_t) bytes; - __stdint(uint8_t) data[20]; + uint8_t dev; + uint8_t bytes; + uint8_t data[20]; } uart_args; } data; } usrp2_ctrl_data_t; -#undef __stdint #ifdef __cplusplus } #endif -- cgit v1.2.3