print error string instead of hex code
This commit is contained in:
1 parent
5607011996
commit
dc0b679332
4 files changed
+5
-4
No files matched your search
@@ -121,6 +121,7 @@
|
||||
#endif
|
||||
|
||||
int cprintf(const char * format, ...);
|
||||
const char* dbg_err_str(uint32_t err_id); // TODO move to other place
|
||||
|
||||
#if CFG_DEBUG
|
||||
#define LOG_LV1(...) ADALOG(__VA_ARGS__)
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <malloc.h>
|
||||
#include "debug.h"
|
||||
#include "utility/utilities.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
// defined in linker script
|
||||
extern uint32_t __data_start__[];
|
||||
|
||||
+2
-1
@@ -37,10 +37,11 @@
|
||||
#ifndef _DEBUG_H
|
||||
#define _DEBUG_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "common_inc.h"
|
||||
|
||||
#if CFG_DEBUG
|
||||
const char* dbg_ble_event_str(uint16_t evt_id);
|
||||
const char* dbg_err_str(uint32_t err_id);
|
||||
#endif
|
||||
|
||||
int dbgHeapTotal(void);
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ extern "C"
|
||||
//--------------------------------------------------------------------+
|
||||
#if CFG_DEBUG >= 1
|
||||
// #define VERIFY_MESS(format, ...) cprintf("[%08ld] %s: %d: verify failed\n", get_millis(), __func__, __LINE__)
|
||||
#define VERIFY_MESS(_status) cprintf("%s: %d: verify failed, status = 0x%04X\n", __PRETTY_FUNCTION__, __LINE__, _status);
|
||||
#define VERIFY_MESS(_status) cprintf("%s: %d: verify failed, status = %s\n", __PRETTY_FUNCTION__, __LINE__, dbg_err_str(_status));
|
||||
#else
|
||||
#define VERIFY_MESS(_status)
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user