Forum Discussion
Altera_Forum
Honored Contributor
22 years agoDevice drivers under niosII IDE
The altera_avalon_uart drivers under niosII IDE contains three files: altera_avalon_uart_regs.h, altera_avalon_uart.h, altera_avalon_uart.c. The source file altera_avalon_uart.c call the function IO...
Altera_Forum
Honored Contributor
22 years agoFound it, thanks. As described in Nios II Software Developer's Handbook, the use of macro IORD(BASE, REGNUM) is to "Read the value of the register at offset REGNUM within a device with base address BASE. Registers are assumed to be offset by the address width of the bus." And the use of macro IORD_8DIRECT(BASE, OFFSET) is to "Make an 8-bit read access at the location with address BASE+OFFSET." Does the two macros both return a byte value? Are the two macros equivalent?