Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2017-2020, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef __TEST_FRAMEWORK_HELPERS_H__ |
| 9 | #define __TEST_FRAMEWORK_HELPERS_H__ |
| 10 | |
| 11 | #include <stdint.h> |
| 12 | #include "psa/protected_storage.h" |
| 13 | #include "test_framework.h" |
| 14 | |
| 15 | #ifdef __cplusplus |
| 16 | extern "C" { |
| 17 | #endif |
| 18 | |
| 19 | enum serial_color_t { |
| 20 | BLACK = 0, |
| 21 | RED = 1, |
| 22 | GREEN = 2, |
| 23 | YELLOW = 3, |
| 24 | BLUE = 4, |
| 25 | MAGENDA = 5, |
| 26 | CYAN = 6, |
| 27 | WHITE = 7, |
| 28 | }; |
| 29 | |
| 30 | /** |
| 31 | * \brief Translates asset permissions into a string. |
| 32 | * |
| 33 | * \param[in] permissions Asset permissions value. |
| 34 | * |
| 35 | * \return asset permissions as string. |
| 36 | */ |
| 37 | const char *asset_perms_to_str(uint8_t permissions); |
| 38 | |
| 39 | /** |
| 40 | * \brief Sets the the text color in the serial port. |
| 41 | * |
| 42 | * \param[in] color_id Serial foreground color. |
| 43 | * |
| 44 | * \return 0 if the message is send successfully, 1 otherwise. |
| 45 | */ |
| 46 | void printf_set_color(enum serial_color_t color_id); |
| 47 | |
| 48 | #ifdef __cplusplus |
| 49 | } |
| 50 | #endif |
| 51 | |
| 52 | #endif /* __TEST_FRAMEWORK_HELPERS_H__ */ |