Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHow to use
i m using alt_avalon_spi_command() now, and i did it according to Altera Embedded Peripherals Handbook chapter 7. I m looking using SPI to transfer some data to another board. And i can't figure ...
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by wei_chen0428@Mar 14 2006, 05:06 AM int alt_avalon_spi_command(alt_u32 base, alt_u32 slave,
alt_u32 write_length, const alt_u8* wdata, alt_u32 read_length,
alt_u8* read_data, alt_u32 flags)
1) where can i find what value i should put for alt_u32 slave?
2) what value should i put for flag?
3) if i m going to just send the data, in mosi mode, what value should i put for read_length and read_data?
4) do you have an example demostrating how to use this command ?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13399)
--- quote end ---
--- Quote End --- 1. alt_u32 slave is the number of slave connected to your master, with the first one starting from "0", as pointed out in the documentation. 2. Flag = ALT_AVALON_SPI_COMMAND_MERGE, if you wish to use that function, else put 0.