Forum Discussion
Altera_Forum
Honored Contributor
16 years agoI assume the HAL interface can not be used on a small footprint nios?
Is that correct? If not, how should I do that? Sorry for being a newbie with this. I managed to get the following working:
#include "altera_avalon_jtag_uart_regs.h"
int i;
char c;
char h;
char s;
c = alt_getchar();
i= IORD(JTAG_UART_0_BASE, ALTERA_AVALON_JTAG_UART_DATA_REG);
alt_printf("\ni=%x", i);
h = i & ALTERA_AVALON_JTAG_UART_DATA_DATA_MSK;
alt_printf("\nchar=%x", h);
s = c >> ALTERA_AVALON_JTAG_UART_DATA_DATA_OFST;
alt_printf("\ns=%c", s);
But when the characters are typed in to soon, it misses several. For example: if I type: ABC it can happen that the B is missed.