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

C++ outbyte函数代码示例

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

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



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

示例1: console_write

rtems_device_driver console_write(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void                    * arg
)
{
  int count;
  int maximum;
  rtems_libio_rw_args_t *rw_args;
  char *buffer;

  rw_args = (rtems_libio_rw_args_t *) arg;

  buffer = rw_args->buffer;
  maximum = rw_args->count;

  for (count = 0; count < maximum; count++) {
    if ( buffer[ count ] == '\n') {
      outbyte('\r');
    }
    outbyte( buffer[ count ] );
  }

  rw_args->bytes_moved = maximum;
  return 0;
}
开发者ID:FullMentalPanic,项目名称:RTEMS_NEW_TOOL_CHAIN,代码行数:26,代码来源:console-io.c


示例2: dumpsw

/*
 *	dump switch table
 */
void dumpsw (INTPTR_T *ws)
/*int	ws[];*/
{
	INTPTR_T	i,j;

//	gdata ();
	gnlabel (ws[WSTAB]);
	if (ws[WSCASEP] != swstp) {
		j = ws[WSCASEP];
		while (j < swstp) {
			defword ();
			i = 4;
			while (i--) {
				outdec (swstcase[j]);
				outbyte (',');
				outlabel (swstlab[j++]);
				if ((i == 0) | (j >= swstp)) {
					newl ();
					break;
				}
				outbyte (',');
			}
		}
	}
	defword ();
	outlabel (ws[WSDEF]);
	outstr (",0");
	newl();
//	gtext ();
}
开发者ID:BouKiCHi,项目名称:husic_git,代码行数:33,代码来源:stmt.c


示例3: putpacket

/*
 * Send the packet in buffer.
 */
void
putpacket(unsigned char *buffer)
{
  unsigned char checksum;
  int count;
  unsigned char ch;

  /*  $<packet info>#<checksum>. */
  do {
    outbyte('$');
    checksum = 0;
    count = 0;
    
    while (ch = buffer[count]) {
      if (! outbyte(ch))
	return;
      checksum += ch;
      count += 1;
    }
    
    outbyte('#');
    outbyte(digit2hex(checksum >> 4));
    outbyte(digit2hex(checksum & 0xf));
    
  }
  while ((inbyte() & 0x7f) != '+');
}
开发者ID:32bitmicro,项目名称:newlib-nano-1.0,代码行数:30,代码来源:debug.c


示例4: hardware_exit_hook

/* Exit back to monitor, with the given status code.  */
void
hardware_exit_hook (int status)
{
  	outbyte ('\r');
  	outbyte ('\n');
	cfe_exit (CFE_FLG_WARMSTART, status);
}
开发者ID:behnaaz,项目名称:jerl,代码行数:8,代码来源:cfe.c


示例5: main

/*********************************************************************
 *
 *  main()
 *
 *********************************************************************/
void main()
{
    char rxdata;
  /******************************************************************
   *
   *  Place your code here.
   ******************************************************************/
  int cnt;
  cnt = 0;
  InitUSART();
  printf("this is example for printf from library\r\n");
  do {
#ifndef USE_UART_INTR
		if (UART_GetChar(USART2, &rxdata) == 0)
		{
		}
		else
		{
            outbyte(rxdata);
            if(rxdata==0x0d)
                outbyte(0x0a);
		}
#endif
    cnt++;
  } while (1);
}
开发者ID:sooya,项目名称:nucleof103-ex,代码行数:31,代码来源:main.c


示例6: __attribute__

__attribute__((weak)) s32
_write (s32 fd, char8* buf, s32 nbytes)
{
#ifdef STDOUT_BASEADDRESS
  s32 i;
  char8* LocalBuf = buf;

  (void)fd;
  for (i = 0; i < nbytes; i++) {
	if(LocalBuf != NULL) {
		LocalBuf += i;
	}
	if(LocalBuf != NULL) {
	    if (*LocalBuf == '\n') {
	      outbyte ('\r');
	    }
	    outbyte (*LocalBuf);
	}
	if(LocalBuf != NULL) {
		LocalBuf -= i;
	}
  }
  return (nbytes);
#else
  (void)fd;
  (void)buf;
  (void)nbytes;
  return 0;
#endif
}
开发者ID:AlexShiLucky,项目名称:freertos,代码行数:30,代码来源:write.c


示例7: prints

/* Print a string - no formatting characters will be interpreted here */
int prints(char** dst, const char *string, int width, int pad)
{
    register int pc = 0, padchar = ' ';

    if (width > 0) {                          
       register int len = 0;                  
       register const char *ptr;              
       for (ptr = string; *ptr; ++ptr) ++len; 
       if (len >= width) width = 0;           
       else width -= len;                     
       if (pad & PAD_ZERO) padchar = '0';     
    }                                         
    if (!(pad & PAD_RIGHT)) {                 
       for ( ; width > 0; --width) {          
          outbyte(dst, padchar);              
          ++pc;                               
       }                                      
    }                                         
    for ( ; *string ; ++string) {             
       outbyte(dst, *string);                 
       ++pc;                                  
    }                                         
    for ( ; width > 0; --width) {             
       outbyte(dst, padchar);                 
       ++pc;                                  
    }                                         

    return pc;                                
}
开发者ID:DeadWitcher,项目名称:amber-de0-nano,代码行数:30,代码来源:printf.c


示例8: getpacket

/*
 * Scan for the sequence $<data>#<checksum>
 */
void
getpacket(unsigned char *buffer)
{
  unsigned char checksum;
  unsigned char xmitcsum;
  int i;
  int count;
  unsigned char ch;

  do {
    /* wait around for the start character, ignore all other characters */
    while ((ch = (inbyte() & 0x7f)) != '$') ;
    
    checksum = 0;
    xmitcsum = -1;
    
    count = 0;
    
    /* now, read until a # or end of buffer is found */
    while (count < BUFMAX) {
      ch = inbyte() & 0x7f;
      if (ch == '#')
	break;
      checksum = checksum + ch;
      buffer[count] = ch;
      count = count + 1;
    }
    
    if (count >= BUFMAX)
      continue;
    
    buffer[count] = 0;
    
    if (ch == '#') {
      xmitcsum = hex2digit(inbyte() & 0x7f) << 4;
      xmitcsum |= hex2digit(inbyte() & 0x7f);
#if 1
      /* Humans shouldn't have to figure out checksums to type to it. */
      outbyte ('+');
      return;
#endif
      if (checksum != xmitcsum)
	outbyte('-');	/* failed checksum */
      else {
	outbyte('+'); /* successful transfer */
	/* if a sequence char is present, reply the sequence ID */
	if (buffer[2] == ':') {
	  outbyte(buffer[0]);
	  outbyte(buffer[1]);
	  /* remove sequence chars from buffer */
	  count = strlen(buffer);
	  for (i=3; i <= count; i++)
	    buffer[i-3] = buffer[i];
	}
      }
    }
  }
  while (checksum != xmitcsum);
}
开发者ID:32bitmicro,项目名称:newlib-nano-1.0,代码行数:62,代码来源:debug.c


示例9: printnibble

extern "C" void printnibble(unsigned int c)
{
	c&=0xf;
	if (c>9)
		outbyte(c+'a'-10);
	else
		outbyte(c+'0');
}
开发者ID:ivanjh,项目名称:ZPUino-HDL,代码行数:8,代码来源:boot.cpp


示例10: outbyte

void SimpleConsole::MoveCursorTo( int x, int y )
{
	int offset = y * width + x;
	outbyte( 0x3D4, 14 );
	outbyte( 0x3D5, offset >> 8  );
	outbyte( 0x3D4, 15 );
	outbyte( 0x3D5, offset&0xFF );
}
开发者ID:Ga-vin,项目名称:sgos,代码行数:8,代码来源:console.cpp


示例11: printe

// source: NUL/NRE
void x86Machine::rebootPCI() {
	if(reqport(0xcf9) < 0) {
		printe("Unable to request port 0xcf9");
		return;
	}
	outbyte(0xcf9,(inbyte(0xcf9) & ~4) | 0x02);
    outbyte(0xcf9,0x06);
    outbyte(0xcf9,0x01);
}
开发者ID:Logout22,项目名称:Escape,代码行数:10,代码来源:x86machine.cpp


示例12: dumplits

void dumplits(
    int size, int pr_label ,
    int queueptr,int queuelab,
    unsigned char *queue)
{
    int j, k,lit ;

    if ( queueptr ) {
        if ( pr_label ) {
            output_section("rodata_compiler"); // output_section("text");
            prefix(); queuelabel(queuelab) ;
            col() ; nl();
        }
        k = 0 ;
        while ( k < queueptr ) {
            /* pseudo-op to define byte */
            if (infunc) j=1;
            else j=10;
            if (size == 1) defbyte();
            else if (size == 4) deflong();
            else if (size == 0 ) { defmesg(); j=30; }
            else defword();
            while ( j-- ) {
                if (size==0) {
                    lit=getint(queue+k,1);
                    if (lit >= 32 && lit <= 126  && lit != '"' && lit != '\\' ) outbyte(lit);
                    else {
                        outstr("\"\n");
                        defbyte();
                        outdec(lit);
                        nl();
                        lit=0;
                    }
                    k++;
                    if ( j == 0 || k >=queueptr || lit == 0 ) {
                        if (lit) outbyte('"');
                        nl();
                        break;
                    }
                } else {
                    outdec(getint(queue+k, size));
                    k += size ;
                    if ( j == 0 || k >= queueptr ) {
                        nl();           /* need <cr> */
                        break;
                    }
                    outbyte(',');   /* separate bytes */
                }
            }
        }
        output_section("code_compiler"); // output_section("code");
    }
    nl();
}
开发者ID:meesokim,项目名称:z88dk,代码行数:54,代码来源:main.c


示例13: main

main ()
{
  outbyte ('&');
  outbyte ('@');
  outbyte ('$');
  outbyte ('%');
  print ("FooBar\r\n");

  /* whew, we made it */
  print ("\r\nDone...\r\n");
/*  fflush(stdout); */
}
开发者ID:32bitmicro,项目名称:newlib-nano-1.0,代码行数:12,代码来源:dtor.C


示例14: write

int write (int fd, char *buf, int nbytes)
{
  int i, j;
  for (i = 0; i < nbytes; i++) {
    if (*(buf + i) == '\n') {
      outbyte ('\r');          /* LF -> CRLF */
    }
    outbyte (*(buf + i));
    for (j = 0; j < 300; j++);
  }
  return (nbytes);
}
开发者ID:kyos1704,项目名称:reports,代码行数:12,代码来源:csys68k.c


示例15: main

int main() {

    unsigned int value=0;
    int i;
    u32 input;

    unsigned int my_array[] = {
    		1841,1371,1356,1435,1364,1474,1741,1790,1720,1770,6770,7460,3660,5045,1111,9481 ,99,100,99,92,159,163,114,177,101,44,55,192,58,81,129,193,124,76,38,181,147,182,77,71,
    		17,164,149,193,62,45,81,176,184,165,28,199,1,199,1,199,1,199,1,199,1,199,1,199,15,12,9,98,9,134,14,15,
    		16,7,2,6,1,4,7,18,1,5,20,21,22,23,24,25,15,15,15,101,199,102,198,103,197,104,196,105,195,111,189,122,
    		184,137,136,135,134,144,141,190,120,170,60,70,30,50,111,981,141,171

    };

    GPIO_0_conf.BaseAddress = XPAR_AXI_GPIO_0_BASEADDR;
    GPIO_0_conf.DeviceId = XPAR_GPIO_0_DEVICE_ID;
    GPIO_0_conf.InterruptPresent = XPAR_GPIO_0_INTERRUPT_PRESENT;
    GPIO_0_conf.IsDual = XPAR_GPIO_0_IS_DUAL;

    //Initialize the XGpio instance
    XGpio_CfgInitialize(&GPIO_0, &GPIO_0_conf, GPIO_0_conf.BaseAddress);

    init_platform();
    print("*Init*\n\r");

    for(i=0;i<size;i++){
    	value = 0xe0000000 | (i<<16) | my_array[i];
    	XGpio_DiscreteWrite(&GPIO_0, 1, value);
    	print("Preencheu RAM! \n\r");
    }

    print("Fim do preenchimento\n\r");
    print("Pressionar btnC\n\r");


	input = XGpio_DiscreteRead(&GPIO_0, 2);


	// Separar valor para mostrar
	outbyte((char)((input/100)+0x30));
	outbyte((char)((input/10)%10+0x30));
	outbyte((char)(input%10+0x30));
	print("\n");







    cleanup_platform();
    return 0;
}
开发者ID:ruipoliveira,项目名称:checkOddWords,代码行数:53,代码来源:helloworld.c


示例16: outhex

/* Newer version, shorter and certainly faster */
void outhex (INTPTR_T number)
{
	int	i = 0;
	char	s[10];

        outbyte('$');

        sprintf(s,"%0X",(int)number);

        while (s[i])
          outbyte(s[i++]);

}
开发者ID:BouKiCHi,项目名称:husic_git,代码行数:14,代码来源:io.c


示例17: writeint

// Writes to uart an unsigned int value as an hex
// number. nibble is the number of hex digits.
void writeint(uint8_t nibbles, uint32_t val)
{
    uint32_t i, digit;

    for (i=0; i<8; i++) {
        if (i >= 8-nibbles) {
            digit = (val & 0xf0000000) >> 28;
            if (digit >= 0xA) 
                outbyte('A'+digit-10);
            else
                outbyte('0'+digit);
        }
        val <<= 4;
    }
开发者ID:B-C,项目名称:Coprocesseur-Flottant,代码行数:16,代码来源:main.c


示例18: printstring

extern "C" void printstring(const char *str)
{
	while (*str) {
		outbyte(*str);
		str++;
	}
}
开发者ID:ivanjh,项目名称:ZPUino-HDL,代码行数:7,代码来源:boot.cpp


示例19: dumplits

/*
 *	dump the literal pool
 */
void dumplits (void)
{
	long j, k;

	if ((litptr == 0) && (const_nb == 0))
		return;

	outstr("\t.data\n");
	outstr("\t.bank CONST_BANK\n");
	if (litptr) {
		outlabel(litlab);
		col();
		k = 0;
		while (k < litptr) {
			defbyte();
			j = 8;
			while (j--) {
				outdec(litq[k++] & 0xFF);
				if ((j == 0) | (k >= litptr)) {
					nl();
					break;
				}
				outbyte(',');
			}
		}
	}
	if (const_nb)
		dump_const();
}
开发者ID:ArtemioUrbina,项目名称:huc,代码行数:32,代码来源:main.c


示例20: doset_sprpalstatement

void doset_sprpalstatement(void)
{ /* syntax is
     number of the first palette to alter : integer
     name of the data for loading palettes : identifier
     [ number of palette to load : integer ]
     if last argument is missing, 1 is assumed
   */

  flush_ins();  /* David, optimize.c related */
  ot("_set_sprpal\t");

  outconst();
  if (outcomma())		return;
  if (outnameunderline())	return;
  if (!match(","))
    {
     outstr(",#");
     outdec(1);
    }
  else
    {
      outbyte(',');
      outconst();
    }

  newl();
  needbrack(")");
}
开发者ID:BouKiCHi,项目名称:husic_git,代码行数:28,代码来源:pseudo.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ outc函数代码示例发布时间:2022-05-30
下一篇:
C++ outb_control函数代码示例发布时间: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