53#if PLATFORM_DBG_CONF_USB
54#define write_byte(b) usb_write((uint8_t *)&b, sizeof(uint8_t))
55#define flush() usb_flush()
57#define write_byte(b) uarte_write(b)
61#if defined(NRF5340_XXAA_NETWORK)
89#elif NRF_TRUSTZONE_NONSECURE
90#include "trustzone/tz-api.h"
92#define DBG_BUF_SIZE 256
93static char dbg_buf[DBG_BUF_SIZE];
94static uint16_t dbg_pos;
99 if(dbg_pos < DBG_BUF_SIZE - 1) {
100 dbg_buf[dbg_pos++] = c;
103 if(c ==
'\n' || dbg_pos >= DBG_BUF_SIZE - 1) {
105 uint16_t len = (dbg_pos > 0 && dbg_buf[dbg_pos - 1] ==
'\n')
106 ? dbg_pos - 1 : dbg_pos;
137 for(i = 0; i < len; i++) {
unsigned int dbg_send_bytes(const unsigned char *s, unsigned int len)
Print a stream of bytes.
int dbg_putchar(int c)
Print a character to debug output.
#define NRF_IPC_LOG_BUF_SIZE
Size of the log ring buffer for forwarding net core output to the app core.
#define NRF_IPC_SHARED_MEM
Get a pointer to the shared memory structure.
void tz_api_println(const char *text, size_t len)
Print the specified message via the secure world.
IPC protocol definitions for nRF5340 dual-core communication.
Shared memory layout between the application core and the network core.
struct nrf_ipc_shared_mem::@9 log
Log ring buffer (net -> app).
volatile uint32_t overflow
Characters dropped due to full buffer.
volatile uint16_t tail
Written by app core.
volatile uint16_t head
Written by net core.
UARTE header file for the nRF.