and how would that work without the standard command?
I'm an altera newbee and have the same problem.
i need to send 7 bit reg-addr.+1bit r/w and 16 bit data
I'm trying with
#include
<altera_avalon_spi_regs.h>
#include <altera_avalon_spi.h>
main{
int test;
while (!(IORD_ALTERA_AVALON_SPI_STATUS(SPI_BASE) & ALTERA_AVALON_SPI_STATUS_TRDY_MSK));
IOWR_ALTERA_AVALON_SPI_TXDATA(SPI_BASE, 0xFFFF);
while (!(IORD_ALTERA_AVALON_SPI_STATUS(SPI_BASE) & ALTERA_AVALON_SPI_STATUS_TRDY_MSK));
test=IORD_ALTERA_AVALON_SPI_RXDATA(SPI_BASE);
}
but the thinks i write dont match with the read data... :(
Any help?