Altera Embedded Peripherals IP Manual do Utilizador Página 63

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 336
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 62
For Nios II processor users, the HAL system library API provides complete access to the JTAG UART
core's features. Nios II programs treat the JTAG UART core as a character mode device, and send and
receive data using the ANSI C standard library functions, such as getchar() and printf().
The Printing Characters to a JTAG UART core as stdout example demonstrates the simplest possible
usage, printing a message to stdout using printf(). In this example, the Qsys system contains a JTAG
UART core, and the HAL system library is configured to use this JTAG UART device for stdout.
Table 7-1: Example: Printing Characters to a JTAG UART Core as stdout
#include <stdio.h>
int main ()
{
printf("Hello world.\n");
return 0;
}
The Transmitting characters to a JTAG UART Core example demonstrates reading characters from and
sending messages to a JTAG UART core using the C standard library. In this example, the Qsys system
contains a JTAG UART core named jtag_uart that is not necessarily configured as the stdout device. In
this case, the program treats the device like any other node in the HAL file system.
7-6
HAL System Library Support
UG-01085
2014.24.07
Altera Corporation
JTAG UART Core
Send Feedback
Vista de página 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 335 336

Comentários a estes Manuais

Sem comentários