[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Compile Errors
From: |
Eric Shufro |
Subject: |
[lwip-users] Compile Errors |
Date: |
Fri, 12 Mar 2004 07:53:39 -0500 |
Compile errors in cs8900.c (contrib.)
The problem is in the while loop below this if, where ptr is no longer in
scope?
if ((PPDATA & 0x0100U/*Rdy4TxNOW*/) != 0)
{
unsigned long sent_bytes = 0;
/* q traverses through linked list of pbuf's
* This list MUST consist of a single packet ONLY */
struct pbuf *q;
for (q = p; q != NULL; q = q->next)
{
u16_t i;
u16_t *ptr = (u16_t *)q->payload;
/* Send the data from the pbuf to the interface, one pbuf at a
* time. The size of the data in each pbuf is kept in the ->len
* variable.
*/
for (i = 0; i < q->len; i += 2)
{
/** TODO: this routine assumes 16-bit boundary pbufs... */
RXTXREG = *ptr++;
sent_bytes += 2;
}
}
/* provide any additional padding to comply with minimum Ethernet
* frame length (RFC10242) */
/*
//changed (commented the while loop out
while (sent_bytes < ETH_MIN_FRAME_LEN)
{
//since the cs8900 can provide its own frame padding
//and ptr is a source of compile time syntax errors
RXTXREG = *ptr++;
sent_bytes += 2;
} */
/*
--eric
- [lwip-users] Compile Errors,
Eric Shufro <=