HPM SDK
HPMicro Software Development Kit
hpm_mcl_debug.h File Reference
#include "hpm_mcl_common.h"

Go to the source code of this file.

Data Structures

struct  mcl_debug_callback_t
 callback function More...
 
struct  mcl_debug_cfg_t
 debug config More...
 
struct  mcl_debug_t
 debug data More...
 

Macros

#define MCL_DEBUG_FIFO   MCL_USER_DEFINED_DEBUG_FIFO
 
#define MCL_DEBUG_DATA_TYPE_SET(num, size)   (((num) << 8) | (size))
 
#define MCL_DEBUG_DATA_TYPE_GET_SIZE(type)   ((type) & 0xff)
 

Enumerations

enum  mcl_debug_data_type_t { mcl_debug_data_i8 = ((( 0 ) << 8) | ( 1 )) , mcl_debug_data_i16 = ((( 1 ) << 8) | ( 2 )) , mcl_debug_data_i32 = ((( 2 ) << 8) | ( 4 )) , mcl_debug_data_f32 = ((( 3 ) << 8) | ( 4 )) }
 Types of debug data. More...
 

Functions

void hpm_mcl_debug_init (mcl_debug_t *debug)
 init debug data struct More...
 
void hpm_mcl_debug_send_scope (mcl_debug_t *debug)
 Sends data in the buffer to the outside, Depending on how the callback function works, this function could potentially hang the application. More...
 
void hpm_mcl_debug_update_data (mcl_debug_t *debug, uint8_t chn, void *data, mcl_debug_data_type_t type)
 Update debug data. More...
 

Macro Definition Documentation

◆ MCL_DEBUG_DATA_TYPE_GET_SIZE

#define MCL_DEBUG_DATA_TYPE_GET_SIZE (   type)    ((type) & 0xff)

◆ MCL_DEBUG_DATA_TYPE_SET

#define MCL_DEBUG_DATA_TYPE_SET (   num,
  size 
)    (((num) << 8) | (size))

◆ MCL_DEBUG_FIFO

#define MCL_DEBUG_FIFO   MCL_USER_DEFINED_DEBUG_FIFO

Enumeration Type Documentation

◆ mcl_debug_data_type_t

Types of debug data.

Enumerator
mcl_debug_data_i8 
mcl_debug_data_i16 
mcl_debug_data_i32 
mcl_debug_data_f32 

Function Documentation

◆ hpm_mcl_debug_init()

void hpm_mcl_debug_init ( mcl_debug_t debug)

init debug data struct

Parameters
debugmcl_debug_t

◆ hpm_mcl_debug_send_scope()

void hpm_mcl_debug_send_scope ( mcl_debug_t debug)

Sends data in the buffer to the outside, Depending on how the callback function works, this function could potentially hang the application.

Parameters
debugmcl_debug_t

◆ hpm_mcl_debug_update_data()

void hpm_mcl_debug_update_data ( mcl_debug_t debug,
uint8_t  chn,
void *  data,
mcl_debug_data_type_t  type 
)

Update debug data.

Parameters
debugmcl_debug_t
chnchannel number
datainput data
typemcl_debug_data_type_t