aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_fw_uart.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/usrp/x300/x300_fw_uart.cpp
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz
uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2
uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
Diffstat (limited to 'host/lib/usrp/x300/x300_fw_uart.cpp')
-rw-r--r--host/lib/usrp/x300/x300_fw_uart.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/usrp/x300/x300_fw_uart.cpp b/host/lib/usrp/x300/x300_fw_uart.cpp
index 7f60e26fc..6e7425c4d 100644
--- a/host/lib/usrp/x300/x300_fw_uart.cpp
+++ b/host/lib/usrp/x300/x300_fw_uart.cpp
@@ -48,7 +48,7 @@ struct x300_uart_iface : uart_iface
{
const int shift = ((txoffset%4) * 8);
if (shift == 0) txword32 = 0;
- txword32 |= boost::uint32_t(ch) << shift;
+ txword32 |= uint32_t(ch) << shift;
// Write out full 32 bit words or whatever we have if end of string
if (txoffset % 4 == 3 or ch == '\n')
{
@@ -82,15 +82,15 @@ struct x300_uart_iface : uart_iface
void update_cache(void)
{
- boost::uint32_t device_rxoffset = _iface->peek32(SR_ADDR(X300_FW_SHMEM_BASE, X300_FW_SHMEM_UART_RX_INDEX));
- boost::uint32_t delta = device_rxoffset - rxoffset;
+ uint32_t device_rxoffset = _iface->peek32(SR_ADDR(X300_FW_SHMEM_BASE, X300_FW_SHMEM_UART_RX_INDEX));
+ uint32_t delta = device_rxoffset - rxoffset;
while (delta)
{
if (delta >= poolsize*4)
{
// all the data is new - reload the entire cache
- for (boost::uint32_t i = 0; i < poolsize; i++)
+ for (uint32_t i = 0; i < poolsize; i++)
_rxcache[i] = _iface->peek32(SR_ADDR(rxpool, i));
// set rxoffset to the end of the first string
@@ -104,7 +104,7 @@ struct x300_uart_iface : uart_iface
else if (rxoffset == _last_device_rxoffset)
{
// new data was added - refresh the portion of the cache that was updated
- for (boost::uint32_t i = ((_last_device_rxoffset+1)/4) % poolsize; i != (((device_rxoffset)/4)+1) % poolsize; i = (i+1) % poolsize)
+ for (uint32_t i = ((_last_device_rxoffset+1)/4) % poolsize; i != (((device_rxoffset)/4)+1) % poolsize; i = (i+1) % poolsize)
{
_rxcache[i] = _iface->peek32(SR_ADDR(rxpool, i));
}
@@ -155,9 +155,9 @@ struct x300_uart_iface : uart_iface
}
wb_iface::sptr _iface;
- boost::uint32_t rxoffset, txoffset, txword32, rxpool, txpool, poolsize;
- boost::uint32_t _last_device_rxoffset;
- std::vector<boost::uint32_t> _rxcache;
+ uint32_t rxoffset, txoffset, txword32, rxpool, txpool, poolsize;
+ uint32_t _last_device_rxoffset;
+ std::vector<uint32_t> _rxcache;
std::string _rxbuff;
boost::mutex _read_mutex;
boost::mutex _write_mutex;