MCU

NIOS II学习三~~UART2

0
阅读(2091)

#include<stdio.h>
#include<string.h>

int main(void)
{
  char *msg="hello world";
  FILE *fp;
  fp="fopen"("/dev/uart","r+");
  if(fp)
  {
    fprintf(fp,"%s",msg);
    fclose(fp);
  }
  return 0;
}

这个的system library 里面的stdout stdin不必设置为uart