-
Notifications
You must be signed in to change notification settings - Fork 3
/
debug.h
23 lines (19 loc) · 879 Bytes
/
debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <stdbool.h>
#include <stddef.h>
struct mobile_adapter;
struct mobile_packet;
struct mobile_addr;
#define MOBILE_DEBUG_BUFFER_SIZE 80
struct mobile_adapter_debug {
unsigned char current;
char buffer[MOBILE_DEBUG_BUFFER_SIZE];
};
void mobile_debug_write(struct mobile_adapter *adapter, const char *data, size_t size);
void mobile_debug_print(struct mobile_adapter *adapter, const char *fmt, ...);
void mobile_debug_print_hex(struct mobile_adapter *adapter, const void *data, size_t size);
void mobile_debug_print_addr(struct mobile_adapter *adapter, const struct mobile_addr *addr);
void mobile_debug_endl(struct mobile_adapter *adapter);
void mobile_debug_init(struct mobile_adapter *adapter);
void mobile_debug_command(struct mobile_adapter *adapter, const struct mobile_packet *packet, bool send);