Index: tools/battor_agent/battor_connection.cc |
diff --git a/tools/battor_agent/battor_connection.cc b/tools/battor_agent/battor_connection.cc |
index bb99599313651a0f0c3aa20e7d26e70953bd31c7..1edf79901ea74a51ac0cfa5c09d290d029a173e5 100644 |
--- a/tools/battor_agent/battor_connection.cc |
+++ b/tools/battor_agent/battor_connection.cc |
@@ -19,10 +19,10 @@ namespace { |
// Serial configuration parameters for the BattOr. |
const uint32_t kBattOrBitrate = 2000000; |
const device::serial::DataBits kBattOrDataBits = |
- device::serial::DATA_BITS_EIGHT; |
+ device::serial::DataBits::EIGHT; |
const device::serial::ParityBit kBattOrParityBit = |
- device::serial::PARITY_BIT_NONE; |
-const device::serial::StopBits kBattOrStopBit = device::serial::STOP_BITS_ONE; |
+ device::serial::ParityBit::NONE; |
+const device::serial::StopBits kBattOrStopBit = device::serial::StopBits::ONE; |
const bool kBattOrCtsFlowControl = true; |
const bool kBattOrHasCtsFlowControl = true; |
const uint32_t kMaxMessageSize = 50000; |
@@ -228,7 +228,7 @@ void BattOrConnection::ReadMoreBytes(size_t bytes_to_read) { |
void BattOrConnection::OnBytesRead(int bytes_read, |
device::serial::ReceiveError error) { |
if ((static_cast<size_t>(bytes_read) < pending_read_length_) || |
- (error != device::serial::RECEIVE_ERROR_NONE)) { |
+ (error != device::serial::ReceiveError::NONE)) { |
listener_->OnBytesRead(false, BATTOR_MESSAGE_TYPE_CONTROL, nullptr); |
return; |
} |
@@ -275,7 +275,7 @@ void BattOrConnection::OnBytesRead(int bytes_read, |
void BattOrConnection::OnBytesSent(int bytes_sent, |
device::serial::SendError error) { |
- bool success = (error == device::serial::SEND_ERROR_NONE) && |
+ bool success = (error == device::serial::SendError::NONE) && |
(pending_write_length_ == static_cast<size_t>(bytes_sent)); |
listener_->OnBytesSent(success); |
} |