AP_IOMCU: added memory to debug code
This commit is contained in:
parent
243cf2199d
commit
9126579b77
@ -50,6 +50,7 @@ AP_IOMCU::AP_IOMCU(AP_HAL::UARTDriver &_uart) :
|
|||||||
#define IOMCU_DEBUG_ENABLE 0
|
#define IOMCU_DEBUG_ENABLE 0
|
||||||
|
|
||||||
#if IOMCU_DEBUG_ENABLE
|
#if IOMCU_DEBUG_ENABLE
|
||||||
|
#include <stdio.h>
|
||||||
#define debug(fmt, args ...) do {printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0)
|
#define debug(fmt, args ...) do {printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0)
|
||||||
#else
|
#else
|
||||||
#define debug(fmt, args ...)
|
#define debug(fmt, args ...)
|
||||||
@ -361,9 +362,10 @@ void AP_IOMCU::read_status()
|
|||||||
static uint32_t last_io_print;
|
static uint32_t last_io_print;
|
||||||
if (now - last_io_print >= 5000) {
|
if (now - last_io_print >= 5000) {
|
||||||
last_io_print = now;
|
last_io_print = now;
|
||||||
debug("t=%u num=%u terr=%u nerr=%u crc=%u opcode=%u rd=%u wr=%u ur=%u ndel=%u\n",
|
debug("t=%u num=%u mem=%u terr=%u nerr=%u crc=%u opcode=%u rd=%u wr=%u ur=%u ndel=%u\n",
|
||||||
now,
|
now,
|
||||||
reg_status.total_pkts,
|
reg_status.total_pkts,
|
||||||
|
reg_status.freemem,
|
||||||
total_errors,
|
total_errors,
|
||||||
reg_status.num_errors,
|
reg_status.num_errors,
|
||||||
reg_status.err_crc,
|
reg_status.err_crc,
|
||||||
|
Loading…
Reference in New Issue
Block a user