• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ print_dbg_ulong函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中print_dbg_ulong函数的典型用法代码示例。如果您正苦于以下问题:C++ print_dbg_ulong函数的具体用法?C++ print_dbg_ulong怎么用?C++ print_dbg_ulong使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了print_dbg_ulong函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: display_perf_bps

/*! \brief Display results in bps
 */
static void display_perf_bps(U32 bandwidth)
{
  if( bandwidth<10000 )
  {
    print_dbg("Bandwidth: ");
    print_dbg(CL_GREEN);
    print_dbg_ulong( bandwidth );
    print_dbg(CL_BLACK);
    print_dbg(" Bps\r\n");
  }
  /*
  else if( bandwidth<10000000 )
  {
    print_dbg("Bandwidth: ");
    print_dbg(CL_GREEN);
    print_dbg_ulong( bandwidth/1000 );
    print_dbg(CL_BLACK);
    print_dbg(" KBps\r\n");
  }*/
  else
  {
    print_dbg("Bandwidth: ");
    print_dbg(CL_GREEN);
    //print_dbg_ulong( bandwidth/1000000 );
    print_dbg_ulong( bandwidth/1000 );
    print_dbg(CL_BLACK);
    print_dbg(" KBps\r\n");
    //print_dbg(" MBps\r\n");
  }
}
开发者ID:Mazetti,项目名称:asf,代码行数:32,代码来源:sd_mmc_mci_example.c


示例2: inode_unpickle

static const u8* inode_unpickle(const u8* src, inode_t* in) {
  /// don't need to pickle indices because we recreate the op list from scratch
  // only need these flags:
  //  in->preset = *src++;
  // play inclusion flag
  in->play = *src++;

  print_dbg(" ; opIdx: ");
  print_dbg_ulong(in->opIdx);
  print_dbg(" ; opInIdx: ");
  print_dbg_ulong(in->opInIdx);


  print_dbg("; got flag: ");
  print_dbg_ulong(in->play);

  // dummy byte for alignment
  ++src; 
  // dummy byte for alignment
  ++src; 
  //// FIXME: dumb, this isn't aligned yet..
  // dummy byte for alignment
  //  ++src; 


  return src;
}
开发者ID:doomglue,项目名称:aleph,代码行数:27,代码来源:net.c


示例3: inode_unpickle

static const u8* inode_unpickle(const u8* src, inode_t* in) {
  /// don't need to pickle indices because we recreate the op list from scratch
  // only need these flags:
  //  in->preset = *src++;
  // play inclusion flag
  in->play = *src++;

#ifdef PRINT_PICKLE
  print_dbg(" ; opIdx: ");
  print_dbg_ulong(in->opIdx);
  print_dbg(" ; opInIdx: ");
  print_dbg_ulong(in->opInIdx);

  print_dbg("; got flag: ");
  print_dbg_ulong(in->play);
#endif

  // dummy byte for alignment
  ++src; 
  // dummy byte for alignment
  ++src; 
  // dummy byte for alignment
  ++src; 


  return src;
}
开发者ID:bensteinberg,项目名称:aleph,代码行数:27,代码来源:net.c


示例4: onode_unpickle

static const u8* onode_unpickle(const u8* src, onode_t* out) {
  u32 v32;

  /* // operator output index */
  /* src = unpickle_32(src, &v32); */
  /* out->opOutIdx = (u8)v32; */

  // output target
  src = unpickle_32(src, &v32);
  out->target = (s16)v32;

  /* // index of parent op */
  /* src = unpickle_32(src, &v32); */
  /* out->opIdx = (s32)v32; */

  // preset flag: 32 bits for alignment
  //  src = unpickle_32(src, &v32);
  //  out->preset = (u8)v32;

#ifdef PRINT_PICKLE
  print_dbg(" ; opIdx: ");
  print_dbg_ulong(out->opIdx);
  print_dbg(" ; opOutIdx: ");
  print_dbg_ulong(out->opOutIdx);
  print_dbg(" ; target: ");
  print_dbg_ulong(out->target);
#endif

  return src;
}
开发者ID:bensteinberg,项目名称:aleph,代码行数:30,代码来源:net.c


示例5: print_angles

/*! \brief Detect 30 and 60 angles
 */
void print_angles()
{
  signed int res;
  static xyz_t angle ;

//  if ( ! is_acc_slow() ) { return }

  if(      0!=(res=is_acc_abs_angle_x(60)) ) angle.x = 60;
  else if( 0!=(res=is_acc_abs_angle_x(30)) ) angle.x = 30;
  else                                       angle.x = 0 ;

  if ( angle.x > 0 )
  {
     if(      res>0 ) print_dbg("LEFT ") ;
     else if( res<0 ) print_dbg("RIGHT ") ;

     print_dbg_ulong(angle.x) ;
     print_dbg("\r\n") ;
  }

  if(      0!=(res=is_acc_abs_angle_y(60)) ) angle.y = 60;
  else if( 0!=(res=is_acc_abs_angle_y(30)) ) angle.y = 30;
  else                                       angle.y = 0 ;

  if ( angle.y > 0 )
  {
     if(      res>0 ) print_dbg("DOWN ") ;
     else if( res<0 ) print_dbg("UP ") ;

     print_dbg_ulong(angle.y) ;
     print_dbg("\r\n") ;
  }
}
开发者ID:InSoonPark,项目名称:asf,代码行数:35,代码来源:acc_example.c


示例6: main

/*! \brief This example shows how to access an external RAM connected to the SMC module.
 */
int main(void)
{
	// Get base address of SRAM module
	volatile uint32_t *sram = SRAM;

	// Switch to external oscillator 0.
	pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP);

	// Initialize debug serial line
	init_dbg_rs232(FOSC0);

	// Display a header to user
	print_dbg("\x1B[2J\x1B[H\r\nSMC Example\r\n");

	print_dbg("Board running at ");
	print_dbg_ulong(FOSC0 / 1000000);
	print_dbg(" MHz\r\n");

	print_dbg("Initializing SRAM...");

	// Initialize the external SRAM chip.
	smc_init(FOSC0);
	print_dbg("done\r\n\r\n");

	print_dbg("Testing SRAM...\r\n");

	// Test each address location inside the chip with a write/readback
	uint32_t total_tests  = 0;
	uint32_t total_errors = 0;

	for (uint32_t total_tests = 0; total_tests < SRAM_SIZE; total_tests++) {
		sram[total_tests] = total_tests;

		if (total_tests != sram[total_tests]) {
			total_errors++;

			print_dbg("Error at 0x");
			print_dbg_hex((uint32_t)&sram[total_tests]);
			print_dbg("\r\n");
		}
    }

	if (total_errors == 0) {
		print_dbg("SRAM test successfully completed\r\n");
	}
	else {
		print_dbg("SRAM test completed with ");
		print_dbg_ulong(total_errors);
		print_dbg(" errors out of ");
		print_dbg_ulong(total_tests);
		print_dbg(" tests\r\n");
	}

	while (true);

	return 0;
}
开发者ID:ThucVD2704,项目名称:femto-usb-blink-example,代码行数:59,代码来源:smc_example.c


示例7: net_print

void net_print(void) {
  print_dbg("\r\n net address: 0x");
  print_dbg_hex((u32)(net));

  print_dbg("\r\n net input count: ");
  print_dbg_ulong(net->numIns);
  print_dbg("\r\n net output count: ");
  print_dbg_ulong(net->numOuts);
  print_dbg("\r\n net op count: ");
  print_dbg_ulong(net->numOps);
}
开发者ID:bensteinberg,项目名称:aleph,代码行数:11,代码来源:net.c


示例8: net_toggle_out_preset

// toggle preset inclusion for output
u8 net_toggle_out_preset(u32 id) {
  u8 tmp = preset_out_enabled(preset_get_select(), id) ^ 1;
  //  net->outs[id].preset ^= 1;
  //  return net->outs[id].preset;
  print_dbg("\r\n toggled output-preset_enable");
  print_dbg(", out: ");
  print_dbg_ulong(id);
  print_dbg(", flag: ");
  print_dbg_ulong(tmp);
  preset_get_selected()->outs[id].enabled = tmp;
  return tmp;
}
开发者ID:bensteinberg,项目名称:aleph,代码行数:13,代码来源:net.c


示例9: display_result

/**
 * \brief Output result through usart
 *
 *  \param refhz Frequency of reference clock(Hz)
 *  \param duration Reference clock cycles
 *  \param msrhz Frequency of measured clock(Hz)
 */
void display_result(uint32_t refhz, uint32_t duration, uint32_t msrhz)
{
	print_dbg("Reference Clock: ");
	print_dbg_ulong(refhz);
	print_dbg(" Hz\r\n");

	print_dbg("Measured Time: ");
	print_dbg_ulong(duration);
	print_dbg(" reference clock cycle\r\n");

	print_dbg("Measured Clock: ");
	print_dbg_ulong(msrhz);
	print_dbg(" Hz\r\n\n");
}
开发者ID:Mazetti,项目名称:asf,代码行数:21,代码来源:freqm_example.c


示例10: handle_key_0

// function keys
void handle_key_0(s32 val) {
  if(val == 0) { return; }
  if(check_key(0)) {
    // select op's inputs on ins page
    pages[ePageIns].select = net_op_in_idx(*pageSelect, 0);
    print_dbg("\r\n got 1st input index for selected op ( ");
    print_dbg_ulong( *pageSelect );
    print_dbg(", result : ");
    print_dbg_ulong( net_op_in_idx(*pageSelect, 0));
    // go to inputs page
    set_page(ePageIns);
    redraw_ins();
  }
  show_foot();
}
开发者ID:dinchak,项目名称:aleph,代码行数:16,代码来源:page_ops.c


示例11: bfin_get_num_params

void bfin_get_num_params(volatile u32* num) {
#if 1

  *num = 0;

#else
  u16 x;

  app_pause();

  // command 
  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);
  spi_write(BFIN_SPI, MSG_GET_NUM_PARAMS_COM);
  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);

  print_dbg("\r\n : spi_write MSG_GET_NUM_PARAMS");

  // read num
  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);
  spi_write(BFIN_SPI, 0); //dont care
  spi_read(BFIN_SPI, &x);
  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  
  *num = (u8)(x & 0xff);

  print_dbg("\r\n : spi_read numparams: ");
  print_dbg_ulong(*num);

  app_resume();

#endif
}
开发者ID:Someone101,项目名称:aleph,代码行数:31,代码来源:bfin.c


示例12: uhc_enumeration_step15

/**
 * \brief Device enumeration step 15
 * Enables UHI interfaces
 *
 * \param add           USB address of the setup request
 * \param status        Transfer status
 * \param payload_trans Number of data transfered during DATA phase
 */
static void uhc_enumeration_step15(
				   usb_add_t add,
				   uhd_trans_status_t status,
				   uint16_t payload_trans)
{
  UNUSED(add);
  if ((status!=UHD_TRANS_NOERROR) || (payload_trans!=0)) {
    for(uint8_t i = 0; i < UHC_NB_UHI; i++) {
      uhc_uhis[i].uninstall(uhc_dev_enum);
    }
    uhc_enumeration_error((status == UHD_TRANS_DISCONNECT)?
			  UHC_ENUM_DISCONNECT : UHC_ENUM_FAIL);
    return;
  }

  // Enable all UHIs supported
  for (uint8_t i = 0; i < UHC_NB_UHI; i++) {
#if UHC_PRINT_DBG
    print_dbg("\r\n enabling UHI, idx: "); print_dbg_ulong(i); 
#endif
    uhc_uhis[i].enable(uhc_dev_enum);
  }
  uhc_enum_try = 0;
	
  UHC_ENUM_EVENT(uhc_dev_enum, UHC_ENUM_SUCCESS);
}
开发者ID:dinchak,项目名称:aleph,代码行数:34,代码来源:uhc.c


示例13: at45dbx_example_test_multiple_sector

/*! \brief Tests multiple-sector access functions.
 */
static void at45dbx_example_test_multiple_sector(void)
{
  U32 position = 252;
  U32 nb_sector = 4;

  // Initialize counters.
  at45dbx_example_error_cnt = 0;

  // Write sectors.
  print_dbg("\tWriting sectors\r\n");
  at45dbx_write_open(position);
  at45dbx_write_multiple_sector(nb_sector);
  at45dbx_write_close();

  // Read written sectors.
  print_dbg("\tReading sectors\t");
  at45dbx_read_open(position);
  at45dbx_read_multiple_sector(nb_sector);
  at45dbx_read_close();

  if (!at45dbx_example_error_cnt)
  {
    print_dbg(TEST_SUCCESS);
  }
  else
  {
    print_dbg(TEST_FAIL "\t");
    print_dbg_ulong(at45dbx_example_error_cnt);
    print_dbg(" errors\r\n");
  }
}
开发者ID:InSoonPark,项目名称:asf,代码行数:33,代码来源:at45dbx_example.c


示例14: handle_key_1

void handle_key_1(s32 val) {
    s16 newOut;
    if(val == 0) {
        return;
    }
    if(check_key(1)) {
        if(altMode) {
            print_dbg("\r\n splitting output: ");
            print_dbg_ulong(*pageSelect);
            newOut = net_split_out(*pageSelect);
            *pageSelect = newOut;
            redraw_outs();
        } else {
            // include / exclude in selected preset
            // show preset name in head region
            draw_preset_name();
            // include / exclude in preset
            net_toggle_out_preset(*pageSelect);
            // re-draw selected line to update inclusion glyph
            // render to tmp buffer
            render_line(*pageSelect, 0xf);
            // copy to scroll with highlight
            render_to_scroll_line(SCROLL_CENTER_LINE, 1);
        }
    }
    show_foot();
}
开发者ID:samdoshi,项目名称:aleph,代码行数:27,代码来源:page_outs.c


示例15: scaler_amp_init

// init function
void scaler_amp_init(void* scaler) {
  ParamScaler* sc = (ParamScaler*)scaler;
  print_dbg("\r\n initializing amp scaler for param, label: ");
  print_dbg(sc->desc->label);
  // check descriptor
  if( sc->desc->type != eParamTypeAmp) {
    print_dbg("\r\n !!! warning: wrong param type for amp scaler");
    print_dbg(" ; this param has type: ");
    print_dbg_ulong(sc->desc->type);
  }
  
  // init flag for static data
  if(initFlag) { 
    ;;
  } else {
    initFlag = 1;

    // assign
    tabVal = scaler_get_nv_data(eParamTypeAmp);
    tabRep = scaler_get_nv_rep(eParamTypeAmp);

  }

    sc->inMin = 0;
    sc->inMax = (tabSize - 1) << inRshift;
  /// FIXME: should consider requested param range,
  //  and compute a customized multiplier here if necessary.
 
}
开发者ID:Someone101,项目名称:aleph,代码行数:30,代码来源:scaler_amp.c


示例16: inc_param_value

// increment value
io_t inc_param_value(u32 idx,  io_t inc) {
  io_t in;
  s32 scaled;

  print_dbg("\r\n inc_param_value, index: ");
  print_dbg_ulong(idx);

  print_dbg(" , input: 0x");
  print_dbg_hex(get_param_value(idx));

  print_dbg(" , increment: 0x");
  print_dbg_hex(inc);


  in = get_param_value(idx);
  // use scaler to increment and lookup
  scaled = scaler_inc( &(net->params[idx].scaler), &in, inc);

  print_dbg(" , new input: 0x");
  print_dbg_hex(in);

  print_dbg(" , scaled: 0x");
  print_dbg_hex(scaled);

  print_dbg("\r\n\r\n ");

  // store input value in pnode
  net->params[idx].data.value = in;
  net->params[idx].data.changed = 1;
  ctl_param_change(idx, scaled );  

  return in;
			   
}
开发者ID:Someone101,项目名称:aleph,代码行数:35,代码来源:param.c


示例17: param_unpickle

const u8* param_unpickle(pnode_t* pnode, const u8* src) {
  u32 val;
  // load idx-
  src = unpickle_32(src, &val);

  // print_dbg("\r\n unpickled param index: ");
  // print_dbg_ulong(val);

  pnode->idx = (u8)val;
  // load value
  
  src = unpickle_32(src, &val);
  pnode->data.value = (ParamValue)val;

  print_dbg(" , val: ");
  print_dbg_ulong(val);
  //  src = unpickle_32(src, &(pnode->data.value.asUint));

  // print_dbg("\r\n unpickled param value: ");
  // print_dbg_ulong(val);

  // load preset-inclusion 
  //  src = unpickle_32(src, &val);

  // print_dbg("\r\n unpickled param preset flag: ");
  // print_dbg_ulong(val);

  //  pnode->preset = (u8)val;
  // load descriptor
  src = pdesc_unpickle(&(pnode->desc), src);
  return src;
}
开发者ID:doomglue,项目名称:aleph,代码行数:32,代码来源:param.c


示例18: list_scan

void list_scan(dirList_t* list, const char* path) {
  FL_DIR dirstat; 
  struct fs_dir_ent dirent;

  list->num = 0;
  strcpy(list->path, path);

  if( fl_opendir(path, &dirstat) ) {      
    while (fl_readdir(&dirstat, &dirent) == 0) {
      if( !(dirent.is_dir) ) {
	strcpy((char*)(list->nameBuf + (list->num * DIR_LIST_NAME_LEN)), dirent.filename);
	print_dbg("\r\n added file: ");
	print_dbg(dirent.filename);
	print_dbg(" , count: ");
	print_dbg_ulong(list->num);
	list->num += 1;
      }
    }
  }
  print_dbg("\r\n scanned list at path: ");
  print_dbg(list->path);
  print_dbg(" , contents : \r\n");
  print_dbg((const char*)list->nameBuf);
  print_dbg("\r\n");
}
开发者ID:doomglue,项目名称:aleph,代码行数:25,代码来源:files.c


示例19: preset_recall

// recall everything enabled in given preset
void preset_recall(u32 preIdx) {
  u16 i;
  print_dbg("\r\n preset_recall INS");
  // ins
  for(i=0; i<net_num_ins(); ++i) {
    if(presets[preIdx].ins[i].enabled) {
      print_dbg("\r\n recalling enabled input in target preset, idx: ");
      print_dbg_ulong(i);
      net_set_in_value( i, presets[preIdx].ins[i].value );
    }
  }

  print_dbg("\r\n preset_recall OUTS");
  // outs
  for(i=0; i<net_num_outs(); ++i) {
    if(presets[preIdx].outs[i].enabled) {
      print_dbg("\r\n recalling enabled output in target preset, idx: ");
      print_dbg_ulong(i);
      print_dbg("\r\n , value: 0x");
      print_dbg_hex(presets[preIdx].outs[i].target);

      net_connect( i, presets[preIdx].outs[i].target );
    }
  }

  /* print_dbg("\r\n preset_recall PARAMS"); */
  /* // params */
  /* for(i=0; i<net_num_params(); ++i) { */
  /*   if(presets[preIdx].params[i].enabled) { */

  /*     print_dbg("\r\n recalling enabled input in target preset, idx: "); */
  /*     print_dbg_ulong(i); */

  /*     set_param_value( i, presets[preIdx].params[i].value ); */
  /*   } */
  /* } */

  
  /// process for play mode if we're in play mode
  if(pageIdx == ePagePlay) {
    play_preset(preIdx);
  }

  // update selection
  select = preIdx;
}
开发者ID:bensteinberg,项目名称:aleph,代码行数:47,代码来源:preset.c


示例20: pdesc_unpickle

const u8* pdesc_unpickle(ParamDesc* pdesc, const u8* src) {
  u32 val;
  u32 i;

  print_dbg(", descriptor: ");

  // store label string
  for(i=0; i<PARAM_LABEL_LEN; ++i) {
    pdesc->label[i] = *src;
    ++src;
  }

  print_dbg(" , label: ");
  print_dbg(pdesc->label);

  // store type
  // pad for alignment
  src = unpickle_32(src, &val);
  pdesc->type = (u8)val;
  print_dbg(" \t, type: ");
  print_dbg_ulong(pdesc->type);
  
  // min
  src = unpickle_32(src, &val);
  pdesc->min = val;
  print_dbg(" \t, min: ");
  print_dbg_hex(pdesc->min);

  // max
  src = unpickle_32(src, &val);
  pdesc->max = val;
  print_dbg(" , max: ");
  print_dbg_ulong(pdesc->max);

  // store radix
  // pad for alignment
  src = unpickle_32(src, &val);
  pdesc->radix = (u8)val;

  print_dbg(" , radix: ");
  print_dbg_ulong(pdesc->radix);

  return src;
}
开发者ID:Someone101,项目名称:aleph,代码行数:44,代码来源:param.c



注:本文中的print_dbg_ulong函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ print_debug函数代码示例发布时间:2022-05-30
下一篇:
C++ print_curr_locks函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap