Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #pragma once |
| 6 | |
| 7 | #include <cstdint> |
| 8 | #include <string> |
| 9 | |
| 10 | namespace arm |
| 11 | { |
| 12 | |
| 13 | namespace pipe |
| 14 | { |
| 15 | void ReadBytes(const unsigned char* buffer, unsigned int offset, unsigned int valueSize, uint8_t outValue[]); |
| 16 | |
| 17 | uint64_t ReadUint64(unsigned const char* buffer, unsigned int offset); |
| 18 | |
| 19 | uint32_t ReadUint32(unsigned const char* buffer, unsigned int offset); |
| 20 | |
| 21 | uint16_t ReadUint16(unsigned const char* buffer, unsigned int offset); |
| 22 | |
| 23 | uint8_t ReadUint8(unsigned const char* buffer, unsigned int offset); |
| 24 | |
| 25 | void WriteBytes(unsigned char* buffer, unsigned int offset, const void* value, unsigned int valueSize); |
| 26 | |
| 27 | void WriteUint64(unsigned char* buffer, unsigned int offset, uint64_t value); |
| 28 | |
| 29 | void WriteUint32(unsigned char* buffer, unsigned int offset, uint32_t value); |
| 30 | |
| 31 | void WriteUint16(unsigned char* buffer, unsigned int offset, uint16_t value); |
| 32 | |
| 33 | void WriteUint8(unsigned char* buffer, unsigned int offset, uint8_t value); |
| 34 | |
| 35 | std::string CentreAlignFormatting(const std::string& stringToPass, const int spacingWidth); |
| 36 | |
| 37 | } // namespace pipe |
| 38 | } // namespace arm |