blob: dc9293434df82073f959917f0d76f5342660e2ed [file] [log] [blame]
Cyril Bur314929b2016-10-14 15:55:16 +11001/* Copyright 2016 IBM
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17#ifndef PREFIX
18#define PREFIX ""
19#endif
20
21enum {
22 MBOX_LOG_NONE = 0,
23 MBOX_LOG_VERBOSE = 1,
24 MBOX_LOG_DEBUG = 2
25} verbosity;
26
27void (*mbox_vlog)(int p, const char *fmt, va_list args);
28
29void mbox_log_console(int p, const char *fmt, va_list args);
30
31__attribute__((format(printf, 2, 3)))
32void mbox_log(int p, const char *fmt, ...);
33
34uint16_t get_u16(uint8_t *ptr);
35
36void put_u16(uint8_t *ptr, uint16_t val);
37
38uint32_t get_u32(uint8_t *ptr);
39
40void put_u32(uint8_t *ptr, uint32_t val);
41
42char *get_dev_mtd(void);