Converted deprecated uIP types in the network stack to standard C99 names (in stdint.h)

This commit is contained in:
Nicholas J Humfrey 2012-02-17 22:45:13 +00:00
parent 022d7193d1
commit 3fe55673d3
39 changed files with 572 additions and 572 deletions

View file

@ -70,15 +70,15 @@
/*---------------------------------------------------------------------------*/
static void
buf_setup(struct psock_buf *buf,
u8_t *bufptr, u16_t bufsize)
uint8_t *bufptr, uint16_t bufsize)
{
buf->ptr = bufptr;
buf->left = bufsize;
}
/*---------------------------------------------------------------------------*/
static u8_t
buf_bufdata(struct psock_buf *buf, u16_t len,
u8_t **dataptr, u16_t *datalen)
static uint8_t
buf_bufdata(struct psock_buf *buf, uint16_t len,
uint8_t **dataptr, uint16_t *datalen)
{
if(*datalen < buf->left) {
memcpy(buf->ptr, *dataptr, *datalen);
@ -104,11 +104,11 @@ buf_bufdata(struct psock_buf *buf, u16_t len,
}
}
/*---------------------------------------------------------------------------*/
static u8_t
buf_bufto(CC_REGISTER_ARG struct psock_buf *buf, u8_t endmarker,
CC_REGISTER_ARG u8_t **dataptr, CC_REGISTER_ARG u16_t *datalen)
static uint8_t
buf_bufto(CC_REGISTER_ARG struct psock_buf *buf, uint8_t endmarker,
CC_REGISTER_ARG uint8_t **dataptr, CC_REGISTER_ARG uint16_t *datalen)
{
u8_t c;
uint8_t c;
while(buf->left > 0 && *datalen > 0) {
c = *buf->ptr = **dataptr;
++*dataptr;
@ -233,7 +233,7 @@ PT_THREAD(psock_generator_send(CC_REGISTER_ARG struct psock *s,
PT_END(&s->psockpt);
}
/*---------------------------------------------------------------------------*/
u16_t
uint16_t
psock_datalen(struct psock *psock)
{
return psock->bufsize - psock->buf.left;
@ -272,7 +272,7 @@ PT_THREAD(psock_readto(CC_REGISTER_ARG struct psock *psock, unsigned char c))
if(psock->readlen == 0) {
PT_WAIT_UNTIL(&psock->psockpt, psock_newdata(psock));
psock->state = STATE_READ;
psock->readptr = (u8_t *)uip_appdata;
psock->readptr = (uint8_t *)uip_appdata;
psock->readlen = uip_datalen();
}
} while((buf_bufto(&psock->buf, c,
@ -300,7 +300,7 @@ PT_THREAD(psock_readbuf_len(CC_REGISTER_ARG struct psock *psock, uint16_t len))
if(psock->readlen == 0) {
PT_WAIT_UNTIL(&psock->psockpt, psock_newdata(psock));
psock->state = STATE_READ;
psock->readptr = (u8_t *)uip_appdata;
psock->readptr = (uint8_t *)uip_appdata;
psock->readlen = uip_datalen();
}
} while(buf_bufdata(&psock->buf, psock->bufsize,