Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: tools/battor_agent/serial_utils.h

Issue 1966413002: [battor agent] Move code for stringifying bytes into a util file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed signed/unsigned char problems Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/battor_agent/battor_protocol_types_unittest.cc ('k') | tools/battor_agent/serial_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/battor_agent/serial_utils.h
diff --git a/tools/battor_agent/serial_utils.h b/tools/battor_agent/serial_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae1e6cc7944bedad835c30a271b6480d5afdcd5f
--- /dev/null
+++ b/tools/battor_agent/serial_utils.h
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TOOLS_BATTOR_AGENT_SERIAL_UTILS_H_
+#define TOOLS_BATTOR_AGENT_SERIAL_UTILS_H_
+
+#include <string>
+#include <vector>
+
+namespace battor {
+
+// Prints |bytes| as a space separated list of hex numbers (e.g. {'A', 'J'}
+// would return "0x41 0x4A").
+std::string CharArrayToString(const char* bytes, size_t len);
+std::string CharVectorToString(const std::vector<char> bytes);
+
+} // namespace battor
+
+#endif // TOOLS_BATTOR_AGENT_SERIAL_UTILS_H_
« no previous file with comments | « tools/battor_agent/battor_protocol_types_unittest.cc ('k') | tools/battor_agent/serial_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698