#include "btstack_config.h"
#include "hci_dump.h"
#include "hci.h"
#include "hci_transport.h"
#include "hci_cmd.h"
#include "btstack_run_loop.h"
#include <stdio.h>
Data Structures | |
struct | hcidump_hdr |
struct | pktlog_hdr |
Macros | |
#define | __BTSTACK_FILE__ "hci_dump.c" |
#define | HCIDUMP_HDR_SIZE 13 |
#define | PKTLOG_HDR_SIZE 13 |
Functions | |
void | hci_dump_close (void) |
void | hci_dump_enable_log_level (int log_level, int enable) |
void | hci_dump_log (int log_level, const char *format,...) |
static int | hci_dump_log_level_active (int log_level) |
void | hci_dump_log_va_arg (int log_level, const char *format, va_list argptr) |
void | hci_dump_open (const char *filename, hci_dump_format_t format) |
void | hci_dump_packet (uint8_t packet_type, uint8_t in, uint8_t *packet, uint16_t len) |
static void | printf_packet (uint8_t packet_type, uint8_t in, uint8_t *packet, uint16_t len) |
static void | printf_timestamp (void) |
Variables | |
static int | dump_file = -1 |
static int | log_level_enabled [3] = { 1, 1, 1} |
#define __BTSTACK_FILE__ "hci_dump.c" |
#define HCIDUMP_HDR_SIZE 13 |
Referenced by hci_dump_packet().
#define PKTLOG_HDR_SIZE 13 |
Referenced by hci_dump_packet().
void hci_dump_close | ( | void | ) |
References dump_file.
void hci_dump_enable_log_level | ( | int | log_level, |
int | enable | ||
) |
References log_level_enabled, and LOG_LEVEL_ERROR.
void hci_dump_log | ( | int | log_level, |
const char * | format, | ||
... | |||
) |
References hci_dump_log_va_arg().
|
static |
References log_level_enabled, and LOG_LEVEL_ERROR.
Referenced by hci_dump_log_va_arg().
void hci_dump_log_va_arg | ( | int | log_level, |
const char * | format, | ||
va_list | argptr | ||
) |
References dump_file, hci_dump_log_level_active(), hci_dump_packet(), LOG_MESSAGE_PACKET, and printf_timestamp().
Referenced by hci_dump_log().
void hci_dump_open | ( | const char * | filename, |
hci_dump_format_t | format | ||
) |
References dump_file, HCI_DUMP_STDOUT, and UNUSED.
void hci_dump_packet | ( | uint8_t | packet_type, |
uint8_t | in, | ||
uint8_t * | packet, | ||
uint16_t | len | ||
) |
References big_endian_store_32(), dump_file, HCI_ACL_DATA_PACKET, HCI_COMMAND_DATA_PACKET, HCI_DUMP_BLUEZ, HCI_DUMP_PACKETLOGGER, HCI_DUMP_STDOUT, HCI_EVENT_PACKET, HCI_SCO_DATA_PACKET, HCIDUMP_HDR_SIZE, little_endian_store_16(), little_endian_store_32(), LOG_MESSAGE_PACKET, NULL, PKTLOG_HDR_SIZE, printf_packet(), and printf_timestamp().
Referenced by atwilc3000_log_event(), atwilc3000_send_command(), atwilc3000_write_memory(), emit_event_new(), hci_dump_log_va_arg(), hci_emit_event(), hci_initializing_run(), hci_send_acl_packet_fragments(), hci_send_cmd_packet(), l2cap_emit_can_send_now(), packet_handler(), and sm_dispatch_event().
|
static |
References HCI_ACL_DATA_PACKET, HCI_COMMAND_DATA_PACKET, HCI_EVENT_PACKET, HCI_SCO_DATA_PACKET, LOG_MESSAGE_PACKET, and printf_hexdump().
Referenced by hci_dump_packet().
|
static |
References btstack_run_loop_get_time_ms(), and NULL.
Referenced by hci_dump_log_va_arg(), and hci_dump_packet().
|
static |
Referenced by hci_dump_close(), hci_dump_log_va_arg(), hci_dump_open(), and hci_dump_packet().
|
static |
Referenced by hci_dump_enable_log_level(), and hci_dump_log_level_active().