blob: 8dffba9a0cc2b36eb9dd778393f00d089e666e24 [file] [log] [blame]
alexander3c798932021-03-26 21:42:19 +00001/*
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
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010023#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
24 #pragma clang diagnostic push
25 #pragma clang diagnostic ignored "-Wunused-parameter"
26#elif defined(__GNUC__)
27 #pragma GCC diagnostic push
28 #pragma GCC diagnostic ignored "-Wunused-parameter"
29#endif
30
alexander3c798932021-03-26 21:42:19 +000031int log_psn_init(void)
32{
33 return 0;
34}
35
36int log_display_image(uint8_t* data, const uint32_t width,
37 const uint32_t height, const uint32_t channels,
38 const uint32_t pos_x, const uint32_t pos_y,
39 const uint32_t downsample_factor)
40{
Isabella Gottardi8df12f32021-04-07 17:15:31 +010041 debug("Image details\n");
42 debug("Data: %p\n", data);
43 debug("WxHxC: %dx%dx%d\n", width, height, channels);
44 debug("Pos (x,y): (%d,%d)\n", pos_x, pos_y);
45 debug("Downsampling factor: %u\n", downsample_factor);
alexander3c798932021-03-26 21:42:19 +000046 return 0;
47}
48
49int log_display_text(const char* str, const size_t str_sz,
50 const uint32_t pos_x, const uint32_t pos_y,
51 const bool allow_multiple_lines)
52{
53 UNUSED(allow_multiple_lines);
Isabella Gottardi8df12f32021-04-07 17:15:31 +010054 debug("%s\n", str);
55 debug("Text size: %lu, x: %d, y: %d\n", str_sz, pos_x, pos_y);
alexander3c798932021-03-26 21:42:19 +000056 return 0;
57}
58
59
60int log_display_box_icon(const uint32_t pos_x, const uint32_t pos_y,
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010061 const uint32_t width, const uint32_t height,
alexander3c798932021-03-26 21:42:19 +000062 const uint16_t color)
63{
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010064 debug("Showing rectangular, width: %d, height: %d, color: %d, x: %d, y: %d\n",
alexander3c798932021-03-26 21:42:19 +000065 width, height, color, pos_x, pos_y);
66 return 0;
67}
68
69int log_clear(const uint16_t color)
70{
Isabella Gottardi8df12f32021-04-07 17:15:31 +010071 debug("Clearing with color: %d\n", color);
alexander3c798932021-03-26 21:42:19 +000072 return 0;
73}
74
75int log_set_text_color (const uint16_t color)
76{
Isabella Gottardi8df12f32021-04-07 17:15:31 +010077 debug("Setting text color: %d\n", color);
alexander3c798932021-03-26 21:42:19 +000078 return 0;
79}
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010080
81#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
82 #pragma clang diagnostic pop
83#elif defined(__GNUC__)
84 #pragma GCC diagnostic pop
85#endif