diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-11 19:44:46 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-11 19:44:46 -0800 |
commit | 18defbd9d40a4c11a33025c8684f48fe51f102c5 (patch) | |
tree | 0108636abe7a42f1c3de22043e7ef230dec89cba /host/lib/usrp/usrp2/fw_common.h | |
parent | 6c03f7e74bf7fcbfbcbc02de89aac9550097afc9 (diff) | |
download | uhd-18defbd9d40a4c11a33025c8684f48fe51f102c5.tar.gz uhd-18defbd9d40a4c11a33025c8684f48fe51f102c5.tar.bz2 uhd-18defbd9d40a4c11a33025c8684f48fe51f102c5.zip |
uhd: add msvc stdint.h so we can use stdints typedefs normally like, fix in fw_common.h
Diffstat (limited to 'host/lib/usrp/usrp2/fw_common.h')
-rw-r--r-- | host/lib/usrp/usrp2/fw_common.h | 48 |
1 files changed, 22 insertions, 26 deletions
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 <stdint.h> + /*! * 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 <boost/cstdint.hpp> - #define __stdint(type) boost::type extern "C" { -#else - #include <stdint.h> - #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 |