alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2021 Arm Limited. All rights reserved. |
| 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" |
| 18 | |
| 19 | #include "dummy_log.h" |
| 20 | |
| 21 | #include <stdint.h> |
| 22 | |
| 23 | int log_psn_init(void) |
| 24 | { |
| 25 | return 0; |
| 26 | } |
| 27 | |
| 28 | int log_display_image(uint8_t* data, const uint32_t width, |
| 29 | const uint32_t height, const uint32_t channels, |
| 30 | const uint32_t pos_x, const uint32_t pos_y, |
| 31 | const uint32_t downsample_factor) |
| 32 | { |
| 33 | info("Image details\n"); |
| 34 | info("Data: %p\n", data); |
| 35 | info("WxHxC: %dx%dx%d\n", width, height, channels); |
| 36 | info("Pos (x,y): (%d,%d)\n", pos_x, pos_y); |
| 37 | info("Downsampling factor: %u\n", downsample_factor); |
| 38 | return 0; |
| 39 | } |
| 40 | |
| 41 | int log_display_text(const char* str, const size_t str_sz, |
| 42 | const uint32_t pos_x, const uint32_t pos_y, |
| 43 | const bool allow_multiple_lines) |
| 44 | { |
| 45 | UNUSED(allow_multiple_lines); |
| 46 | info("%s\n", str); |
| 47 | info("Text size: %lu, x: %d, y: %d\n", str_sz, pos_x, pos_y); |
| 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | |
| 52 | int log_display_box_icon(const uint32_t pos_x, const uint32_t pos_y, |
| 53 | const uint32_t width, const uint32_t height, |
| 54 | const uint16_t color) |
| 55 | { |
| 56 | info("Showing rectangular, width: %d, height: %d, color: %d, x: %d, y: %d\n", |
| 57 | width, height, color, pos_x, pos_y); |
| 58 | return 0; |
| 59 | } |
| 60 | |
| 61 | int log_clear(const uint16_t color) |
| 62 | { |
| 63 | info("Clearing with color: %d\n", color); |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | int log_set_text_color (const uint16_t color) |
| 68 | { |
| 69 | info("Setting text color: %d\n", color); |
| 70 | return 0; |
| 71 | } |