Commit caf42e0c authored by bencefr's avatar bencefr
Browse files

Version dependent typedef for boost asio service

parent 7fe2c02f
...@@ -50,6 +50,12 @@ ...@@ -50,6 +50,12 @@
#include <stdint.h> #include <stdint.h>
#if BOOST_VERSION >= 106600
typedef boost::asio::io_context asio_io_context;
#else
typedef boost::asio::io_service asio_io_context;
#endif
/** /**
* @brief The UartBoost class opens, reads and writes a serial port using the boost asio library * @brief The UartBoost class opens, reads and writes a serial port using the boost asio library
*/ */
...@@ -97,9 +103,9 @@ private: ...@@ -97,9 +103,9 @@ private:
*/ */
void asyncWrite(); void asyncWrite();
boost::asio::io_service ioService; asio_io_context ioService;
boost::asio::serial_port serialPort; boost::asio::serial_port serialPort;
boost::asio::io_service::work workNotifier; asio_io_context::work workNotifier;
boost::thread ioWorkThread; boost::thread ioWorkThread;
boost::array<uint8_t, BUFFER_SIZE> readBuffer; boost::array<uint8_t, BUFFER_SIZE> readBuffer;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment