alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 1 | /* |
Richard Burton | 9c54990 | 2022-02-15 16:39:18 +0000 | [diff] [blame] | 2 | * Copyright (c) 2021-2022 Arm Limited. All rights reserved. |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 3 | * SPDX-License-Identifier: Apache-2.0 |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | #include "log.h" |
alexander | 31ae9f0 | 2022-02-10 16:15:54 +0000 | [diff] [blame] | 18 | #include "log_macros.h" |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 19 | |
| 20 | #include <stdint.h> |
| 21 | |
Kshitij Sisodia | f9c19ea | 2021-05-07 16:08:14 +0100 | [diff] [blame] | 22 | #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) |
| 23 | #pragma clang diagnostic push |
| 24 | #pragma clang diagnostic ignored "-Wunused-parameter" |
| 25 | #elif defined(__GNUC__) |
| 26 | #pragma GCC diagnostic push |
| 27 | #pragma GCC diagnostic ignored "-Wunused-parameter" |
| 28 | #endif |
| 29 | |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 30 | int log_psn_init(void) |
| 31 | { |
| 32 | return 0; |
| 33 | } |
| 34 | |
Richard Burton | 9c54990 | 2022-02-15 16:39:18 +0000 | [diff] [blame] | 35 | int log_display_image(const uint8_t* data, const uint32_t width, |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 36 | const uint32_t height, const uint32_t channels, |
| 37 | const uint32_t pos_x, const uint32_t pos_y, |
| 38 | const uint32_t downsample_factor) |
| 39 | { |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 40 | debug("Image details\n"); |
| 41 | debug("Data: %p\n", data); |
| 42 | debug("WxHxC: %dx%dx%d\n", width, height, channels); |
| 43 | debug("Pos (x,y): (%d,%d)\n", pos_x, pos_y); |
| 44 | debug("Downsampling factor: %u\n", downsample_factor); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 45 | return 0; |
| 46 | } |
| 47 | |
| 48 | int log_display_text(const char* str, const size_t str_sz, |
| 49 | const uint32_t pos_x, const uint32_t pos_y, |
| 50 | const bool allow_multiple_lines) |
| 51 | { |
| 52 | UNUSED(allow_multiple_lines); |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 53 | debug("%s\n", str); |
| 54 | debug("Text size: %lu, x: %d, y: %d\n", str_sz, pos_x, pos_y); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 55 | return 0; |
| 56 | } |
| 57 | |
| 58 | |
| 59 | int log_display_box_icon(const uint32_t pos_x, const uint32_t pos_y, |
Kshitij Sisodia | f9c19ea | 2021-05-07 16:08:14 +0100 | [diff] [blame] | 60 | const uint32_t width, const uint32_t height, |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 61 | const uint16_t color) |
| 62 | { |
Kshitij Sisodia | f9c19ea | 2021-05-07 16:08:14 +0100 | [diff] [blame] | 63 | debug("Showing rectangular, width: %d, height: %d, color: %d, x: %d, y: %d\n", |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 64 | width, height, color, pos_x, pos_y); |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | int log_clear(const uint16_t color) |
| 69 | { |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 70 | debug("Clearing with color: %d\n", color); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 71 | return 0; |
| 72 | } |
| 73 | |
| 74 | int log_set_text_color (const uint16_t color) |
| 75 | { |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 76 | debug("Setting text color: %d\n", color); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 77 | return 0; |
| 78 | } |
Kshitij Sisodia | f9c19ea | 2021-05-07 16:08:14 +0100 | [diff] [blame] | 79 | |
| 80 | #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) |
| 81 | #pragma clang diagnostic pop |
| 82 | #elif defined(__GNUC__) |
| 83 | #pragma GCC diagnostic pop |
| 84 | #endif |