Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 1 | /* |
Raef Coles | e1a8c9f | 2021-06-09 14:11:34 +0100 | [diff] [blame^] | 2 | * Copyright (c) 2017-2021, Arm Limited. All rights reserved. |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 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 { |
Raef Coles | e1a8c9f | 2021-06-09 14:11:34 +0100 | [diff] [blame^] | 20 | DEFAULT = 0, |
| 21 | BLACK = 30, |
| 22 | RED = 31, |
| 23 | GREEN = 32, |
| 24 | YELLOW = 33, |
| 25 | BLUE = 34, |
| 26 | MAGENDA = 35, |
| 27 | CYAN = 36, |
| 28 | WHITE = 37, |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | /** |
| 32 | * \brief Translates asset permissions into a string. |
| 33 | * |
| 34 | * \param[in] permissions Asset permissions value. |
| 35 | * |
| 36 | * \return asset permissions as string. |
| 37 | */ |
| 38 | const char *asset_perms_to_str(uint8_t permissions); |
| 39 | |
| 40 | /** |
| 41 | * \brief Sets the the text color in the serial port. |
| 42 | * |
| 43 | * \param[in] color_id Serial foreground color. |
| 44 | * |
| 45 | * \return 0 if the message is send successfully, 1 otherwise. |
| 46 | */ |
| 47 | void printf_set_color(enum serial_color_t color_id); |
| 48 | |
| 49 | #ifdef __cplusplus |
| 50 | } |
| 51 | #endif |
| 52 | |
| 53 | #endif /* __TEST_FRAMEWORK_HELPERS_H__ */ |