Extended MaximInterface
Dependents: mbed_DS28EC20_GPIO
Diff: Utilities/HexConversions.hpp
- Revision:
- 6:a8c83a2e6fa4
- Parent:
- 0:f77ad7f72d04
--- a/Utilities/HexConversions.hpp Fri Jan 19 10:25:02 2018 -0600 +++ b/Utilities/HexConversions.hpp Wed Jan 23 13:11:04 2019 -0600 @@ -37,16 +37,18 @@ #include <stdint.h> #include <string> #include <vector> -#include <MaximInterface/Utilities/Export.h> +#include "Export.h" +#include "optional.hpp" +#include "span.hpp" namespace MaximInterface { /// Convert a byte array to a hex string. MaximInterface_EXPORT std::string -byteArrayToHexString(const uint_least8_t * byteArray, size_t byteArraySize); +byteArrayToHexString(span<const uint_least8_t> byteArray); /// Convert a hex string to a byte array. -MaximInterface_EXPORT std::vector<uint_least8_t> +MaximInterface_EXPORT optional<std::vector<uint_least8_t> > hexStringToByteArray(const std::string & hexString); } // namespace MaximInterface