blob: e37b4cac3c7496d5a76479fec3f31983c3b328be [file] [log] [blame]
alexander3c798932021-03-26 21:42:19 +00001/*
Richard Burton9c549902022-02-15 16:39:18 +00002 * Copyright (c) 2021-2022 Arm Limited. All rights reserved.
alexander3c798932021-03-26 21:42:19 +00003 * 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"
alexander31ae9f02022-02-10 16:15:54 +000018#include "log_macros.h"
alexander3c798932021-03-26 21:42:19 +000019
20#include <stdint.h>
21
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010022#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
alexander3c798932021-03-26 21:42:19 +000030int log_psn_init(void)
31{
32 return 0;
33}
34
Richard Burton9c549902022-02-15 16:39:18 +000035int log_display_image(const uint8_t* data, const uint32_t width,
alexander3c798932021-03-26 21:42:19 +000036 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 Gottardi8df12f32021-04-07 17:15:31 +010040 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);
alexander3c798932021-03-26 21:42:19 +000045 return 0;
46}
47
48int 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 Gottardi8df12f32021-04-07 17:15:31 +010053 debug("%s\n", str);
54 debug("Text size: %lu, x: %d, y: %d\n", str_sz, pos_x, pos_y);
alexander3c798932021-03-26 21:42:19 +000055 return 0;
56}
57
58
59int log_display_box_icon(const uint32_t pos_x, const uint32_t pos_y,
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010060 const uint32_t width, const uint32_t height,
alexander3c798932021-03-26 21:42:19 +000061 const uint16_t color)
62{
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010063 debug("Showing rectangular, width: %d, height: %d, color: %d, x: %d, y: %d\n",
alexander3c798932021-03-26 21:42:19 +000064 width, height, color, pos_x, pos_y);
65 return 0;
66}
67
68int log_clear(const uint16_t color)
69{
Isabella Gottardi8df12f32021-04-07 17:15:31 +010070 debug("Clearing with color: %d\n", color);
alexander3c798932021-03-26 21:42:19 +000071 return 0;
72}
73
74int log_set_text_color (const uint16_t color)
75{
Isabella Gottardi8df12f32021-04-07 17:15:31 +010076 debug("Setting text color: %d\n", color);
alexander3c798932021-03-26 21:42:19 +000077 return 0;
78}
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010079
80#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
81 #pragma clang diagnostic pop
82#elif defined(__GNUC__)
83 #pragma GCC diagnostic pop
84#endif