Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

light weight IP

I tried the following code in accordance to the light weight ip. It should transfer data from the memory over the telnet connection. But it doesn't work. Compilation is successfull. When I directly place the for-loop in the send menue routine the code will work.

What am I doing wrong?

Thank's in advance. andy

----

void SSSValuesOverIP(SSSConn* conn)

{

alt_u8 tx_buf[SSS_TX_BUF_SIZE];

alt_u8 *tx_wr_pos = tx_buf;

int address_counter;

int memory_base;

int exchange;

exchange = 0;

memory_base = 0x01000000;

tx_wr_pos += sprintf(tx_wr_pos,"Sending five values \n\r");

for (address_counter = 0; address_counter <=5; address_counter++)

{

hilfsvariable = IORD_8DIRECT(memory_base,address_counter);

tx_wr_pos += sprintf(tx_wr_pos,"%X",exchange);

tx_wr_pos += sprintf(tx_wr_pos," ");

send(conn->fd, tx_buf, tx_wr_pos - tx_buf, 0);

}

return;

}
No RepliesBe the first to reply