mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-05 21:04:49 +00:00
feat(nimble): Support for sending NimBLE logs over SPI
This commit is contained in:
@@ -26,6 +26,14 @@
|
||||
#include "log/log.h"
|
||||
#include "log_common/log_common.h"
|
||||
|
||||
#if CONFIG_BLE_HOST_NIMBLE_COMPRESSED_LOG_ENABLE
|
||||
#include "nimble_log_index.h"
|
||||
#endif
|
||||
|
||||
#if CONFIG_BLE_LOG_ENABLED
|
||||
#include "ble_log.h"
|
||||
#endif
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include "esp_log.h"
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "modlog/modlog.h"
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#if CONFIG_BLE_LOG_ENABLED
|
||||
void MODLOG_INFO(int mod, char * msg, ...) {
|
||||
char buffer[1000];
|
||||
int len;
|
||||
va_list args;
|
||||
|
||||
memset(buffer, 0, 1000);
|
||||
va_start(args, msg);
|
||||
len = sprintf(buffer, args);
|
||||
va_end(args);
|
||||
|
||||
ble_log_write_hex(BLE_LOG_SRC_HOST, (uint8_t *)buffer, len);
|
||||
ble_log_flush();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user