diff --git a/apps/cmdd/cmdd.c b/apps/cmdd/cmdd.c index 2912b7410..6dfebe42f 100644 --- a/apps/cmdd/cmdd.c +++ b/apps/cmdd/cmdd.c @@ -25,10 +25,10 @@ static const char *prompt = "contiki> "; /*---------------------------------------------------------------------------*/ static char * CC_FASTCALL -n(u16_t num, char *ptr) +n(uint16_t num, char *ptr) { - u16_t d; - u8_t a, f; + uint16_t d; + uint8_t a, f; if(num == 0) { *ptr = '0'; diff --git a/apps/codeprop/codeprop-tmp.c b/apps/codeprop/codeprop-tmp.c index 06e7284ef..a6a4dfc28 100644 --- a/apps/codeprop/codeprop-tmp.c +++ b/apps/codeprop/codeprop-tmp.c @@ -104,18 +104,18 @@ static const char *err_msgs[] = #define UDPDATASIZE 32 struct codeprop_udphdr { - u16_t id; - u16_t type; + uint16_t id; + uint16_t type; #define TYPE_DATA 0x0001 #define TYPE_NACK 0x0002 - u16_t addr; - u16_t len; - u8_t data[UDPDATASIZE]; + uint16_t addr; + uint16_t len; + uint8_t data[UDPDATASIZE]; }; struct codeprop_tcphdr { - u16_t len; - u16_t pad; + uint16_t len; + uint16_t pad; }; static void uipcall(void *state); @@ -123,19 +123,19 @@ static void uipcall(void *state); PROCESS(codeprop_process, "Code propagator"); struct codeprop_state { - u8_t state; + uint8_t state; #define STATE_NONE 0 #define STATE_RECEIVING_TCPDATA 1 #define STATE_RECEIVING_UDPDATA 2 #define STATE_SENDING_UDPDATA 3 - u16_t count; - u16_t addr; - u16_t len; - u16_t id; + uint16_t count; + uint16_t addr; + uint16_t len; + uint16_t id; struct etimer sendtimer; struct timer nacktimer, timer, starttimer; - u8_t received; - u8_t send_counter; + uint8_t received; + uint8_t send_counter; struct pt tcpthread_pt; struct pt udpthread_pt; struct pt recv_udpthread_pt; @@ -198,10 +198,10 @@ PROCESS_THREAD(codeprop_process, ev, data) PROCESS_END(); } /*---------------------------------------------------------------------*/ -static u16_t +static uint16_t send_udpdata(struct codeprop_udphdr *uh) { - u16_t len; + uint16_t len; uh->type = UIP_HTONS(TYPE_DATA); uh->addr = uip_htons(s.addr); @@ -367,7 +367,7 @@ PT_THREAD(recv_udpthread(struct pt *pt)) static PT_THREAD(recv_tcpthread(struct pt *pt)) { - u8_t *dataptr; + uint8_t *dataptr; struct codeprop_tcphdr *th; int datalen = uip_datalen(); PT_BEGIN(pt); diff --git a/apps/codeprop/codeprop.c b/apps/codeprop/codeprop.c index 046755f7e..f0b822667 100644 --- a/apps/codeprop/codeprop.c +++ b/apps/codeprop/codeprop.c @@ -104,13 +104,13 @@ void codeprop_set_rate(clock_time_t time); #define UDPDATASIZE 32 struct codeprop_udphdr { - u16_t id; - u16_t type; + uint16_t id; + uint16_t type; #define TYPE_DATA 0x0001 #define TYPE_NACK 0x0002 - u16_t addr; - u16_t len; - u8_t data[UDPDATASIZE]; + uint16_t addr; + uint16_t len; + uint8_t data[UDPDATASIZE]; }; static void uipcall(void *state); @@ -118,19 +118,19 @@ static void uipcall(void *state); PROCESS(codeprop_process, "Code propagator"); struct codeprop_state { - u8_t state; + uint8_t state; #define STATE_NONE 0 #define STATE_RECEIVING_TCPDATA 1 #define STATE_RECEIVING_UDPDATA 2 #define STATE_SENDING_UDPDATA 3 - u16_t count; - u16_t addr; - u16_t len; - u16_t id; + uint16_t count; + uint16_t addr; + uint16_t len; + uint16_t id; struct etimer sendtimer; struct timer nacktimer, timer, starttimer; - u8_t received; - u8_t send_counter; + uint8_t received; + uint8_t send_counter; struct pt tcpthread_pt; struct pt udpthread_pt; struct pt recv_udpthread_pt; @@ -199,10 +199,10 @@ PROCESS_THREAD(codeprop_process, ev, data) PROCESS_END(); } /*---------------------------------------------------------------------*/ -static u16_t +static uint16_t send_udpdata(struct codeprop_udphdr *uh) { - u16_t len; + uint16_t len; uh->type = UIP_HTONS(TYPE_DATA); uh->addr = uip_htons(s.addr); @@ -360,7 +360,7 @@ PT_THREAD(recv_udpthread(struct pt *pt)) static PT_THREAD(recv_tcpthread(struct pt *pt)) { - u8_t *dataptr; + uint8_t *dataptr; struct codeprop_tcphdr *th; int datalen = uip_datalen(); diff --git a/apps/codeprop/codeprop.h b/apps/codeprop/codeprop.h index 4b5f967db..5ead82cb8 100644 --- a/apps/codeprop/codeprop.h +++ b/apps/codeprop/codeprop.h @@ -38,8 +38,8 @@ #define CODEPROP_DATA_PORT 6510 struct codeprop_tcphdr { - u16_t len; - u16_t pad; + uint16_t len; + uint16_t pad; }; PROCESS_NAME(codeprop_process); diff --git a/apps/codeprop/tcp_loader.c b/apps/codeprop/tcp_loader.c index bab36ca22..700ee5495 100644 --- a/apps/codeprop/tcp_loader.c +++ b/apps/codeprop/tcp_loader.c @@ -50,8 +50,8 @@ PROCESS(tcp_loader_process, "TCP loader"); static struct codeprop_state { - u16_t addr; - u16_t len; + uint16_t addr; + uint16_t len; struct pt tcpthread_pt; } s; diff --git a/apps/codeprop/tcp_loader2.c b/apps/codeprop/tcp_loader2.c index 115834de4..4b861473d 100644 --- a/apps/codeprop/tcp_loader2.c +++ b/apps/codeprop/tcp_loader2.c @@ -55,8 +55,8 @@ PROCESS(tcp_loader_process, "TCP loader"); static struct codeprop_state { - u16_t addr; - u16_t len; + uint16_t addr; + uint16_t len; struct pt tcpthread_pt; } s; diff --git a/apps/dhcp/dhcp.c b/apps/dhcp/dhcp.c index c492cf6df..9ea9b0605 100644 --- a/apps/dhcp/dhcp.c +++ b/apps/dhcp/dhcp.c @@ -48,7 +48,7 @@ set_statustext(char *text) } /*---------------------------------------------------------------------------*/ static char * -makebyte(u8_t byte, char *str) +makebyte(uint8_t byte, char *str) { if(byte >= 100) { *str++ = (byte / 100 ) % 10 + '0'; diff --git a/apps/email/smtp-socket.c b/apps/email/smtp-socket.c index 64dd2baf6..01ae54527 100644 --- a/apps/email/smtp-socket.c +++ b/apps/email/smtp-socket.c @@ -52,9 +52,9 @@ struct smtp_state { char *from; char *subject; char *msg; - u8_t msgwidth; - u8_t msgheight; - u8_t line; + uint8_t msgwidth; + uint8_t msgheight; + uint8_t line; }; static struct smtp_state s; @@ -209,7 +209,7 @@ smtp_configure(char *lhostname, uip_ipaddr_t *server) /*---------------------------------------------------------------------------*/ unsigned char smtp_send(char *to, char *cc, char *from, char *subject, - char *msg, u8_t msgwidth, u8_t msgheight) + char *msg, uint8_t msgwidth, uint8_t msgheight) { struct uip_conn *conn; diff --git a/apps/email/smtp.h b/apps/email/smtp.h index f420fa090..84c31958c 100644 --- a/apps/email/smtp.h +++ b/apps/email/smtp.h @@ -45,7 +45,7 @@ void smtp_configure(char *localhostname, uip_ipaddr_t *smtpserver); unsigned char smtp_send(char *to, char *cc, char *from, char *subject, char *msg, - u8_t msgwidth, u8_t msgheight); + uint8_t msgwidth, uint8_t msgheight); void smtp_appcall(void *state); diff --git a/apps/er-coap-03/er-coap-03-engine.c b/apps/er-coap-03/er-coap-03-engine.c index a11f7f5d0..610209f13 100644 --- a/apps/er-coap-03/er-coap-03-engine.c +++ b/apps/er-coap-03/er-coap-03-engine.c @@ -47,7 +47,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #define PRINTBITS(buf,len) { \ int i,j=0; \ diff --git a/apps/er-coap-03/er-coap-03-observing.c b/apps/er-coap-03/er-coap-03-observing.c index 82e8cbffa..2da95248c 100644 --- a/apps/er-coap-03/er-coap-03-observing.c +++ b/apps/er-coap-03/er-coap-03-observing.c @@ -44,7 +44,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-03/er-coap-03-transactions.c b/apps/er-coap-03/er-coap-03-transactions.c index 2ed691d86..ef2c5b65e 100644 --- a/apps/er-coap-03/er-coap-03-transactions.c +++ b/apps/er-coap-03/er-coap-03-transactions.c @@ -46,7 +46,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-03/er-coap-03.c b/apps/er-coap-03/er-coap-03.c index b02227ba2..10b95f59f 100644 --- a/apps/er-coap-03/er-coap-03.c +++ b/apps/er-coap-03/er-coap-03.c @@ -63,7 +63,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-06/er-coap-06-engine.c b/apps/er-coap-06/er-coap-06-engine.c index ff1c3a4f4..f03e279f3 100644 --- a/apps/er-coap-06/er-coap-06-engine.c +++ b/apps/er-coap-06/er-coap-06-engine.c @@ -47,7 +47,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #define PRINTBITS(buf,len) { \ int i,j=0; \ diff --git a/apps/er-coap-06/er-coap-06-observing.c b/apps/er-coap-06/er-coap-06-observing.c index 43f5fff49..06c454883 100644 --- a/apps/er-coap-06/er-coap-06-observing.c +++ b/apps/er-coap-06/er-coap-06-observing.c @@ -44,7 +44,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-06/er-coap-06-separate.c b/apps/er-coap-06/er-coap-06-separate.c index 292acca0d..ee935de3d 100644 --- a/apps/er-coap-06/er-coap-06-separate.c +++ b/apps/er-coap-06/er-coap-06-separate.c @@ -44,7 +44,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-06/er-coap-06-transactions.c b/apps/er-coap-06/er-coap-06-transactions.c index 980fad7f3..47958bd8d 100644 --- a/apps/er-coap-06/er-coap-06-transactions.c +++ b/apps/er-coap-06/er-coap-06-transactions.c @@ -52,7 +52,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-06/er-coap-06.c b/apps/er-coap-06/er-coap-06.c index 013001c48..62b86eb2d 100644 --- a/apps/er-coap-06/er-coap-06.c +++ b/apps/er-coap-06/er-coap-06.c @@ -48,7 +48,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-07/er-coap-07-engine.c b/apps/er-coap-07/er-coap-07-engine.c index 245072b8e..0a226c7ac 100644 --- a/apps/er-coap-07/er-coap-07-engine.c +++ b/apps/er-coap-07/er-coap-07-engine.c @@ -47,7 +47,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #define PRINTBITS(buf,len) { \ int i,j=0; \ diff --git a/apps/er-coap-07/er-coap-07-observing.c b/apps/er-coap-07/er-coap-07-observing.c index 6c6ed7f1c..f242165be 100644 --- a/apps/er-coap-07/er-coap-07-observing.c +++ b/apps/er-coap-07/er-coap-07-observing.c @@ -44,7 +44,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-07/er-coap-07-separate.c b/apps/er-coap-07/er-coap-07-separate.c index f27aed4a7..8cd89dcbe 100644 --- a/apps/er-coap-07/er-coap-07-separate.c +++ b/apps/er-coap-07/er-coap-07-separate.c @@ -44,7 +44,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-07/er-coap-07-transactions.c b/apps/er-coap-07/er-coap-07-transactions.c index 739fd746a..bfca2a23b 100644 --- a/apps/er-coap-07/er-coap-07-transactions.c +++ b/apps/er-coap-07/er-coap-07-transactions.c @@ -53,7 +53,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/er-coap-07/er-coap-07.c b/apps/er-coap-07/er-coap-07.c index 1e3223b2e..a9aed1791 100644 --- a/apps/er-coap-07/er-coap-07.c +++ b/apps/er-coap-07/er-coap-07.c @@ -49,7 +49,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/erbium/erbium.c b/apps/erbium/erbium.c index 007b1ee2f..165a9c252 100644 --- a/apps/erbium/erbium.c +++ b/apps/erbium/erbium.c @@ -45,7 +45,7 @@ #define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/ftp/ftp.c b/apps/ftp/ftp.c index 2d5cf7906..719e535cd 100644 --- a/apps/ftp/ftp.c +++ b/apps/ftp/ftp.c @@ -674,7 +674,7 @@ ftpc_connected(void *connection) } /*---------------------------------------------------------------------------*/ void -ftpc_data(u8_t *data, u16_t len) +ftpc_data(uint8_t *data, uint16_t len) { if(data == NULL) { show_statustext("Download complete", ""); diff --git a/apps/ftp/ftpc.c b/apps/ftp/ftpc.c index 0107cd7e0..81b1e1468 100644 --- a/apps/ftp/ftpc.c +++ b/apps/ftp/ftpc.c @@ -52,7 +52,7 @@ struct ftp_dataconn { #define CONNTYPE_LIST 0 #define CONNTYPE_FILE 1 - u16_t port; + uint16_t port; unsigned char filenameptr; char filename[MAX_FILENAMELEN]; @@ -128,7 +128,7 @@ ftpc_init(void) } /*---------------------------------------------------------------------------*/ void * -ftpc_connect(uip_ipaddr_t *ipaddr, u16_t port) +ftpc_connect(uip_ipaddr_t *ipaddr, uint16_t port) { struct ftp_connection *c; @@ -212,8 +212,8 @@ handle_input(struct ftp_connection *c) static void newdata(struct ftp_connection *c) { - u16_t i; - u8_t d; + uint16_t i; + uint8_t d; for(i = 0; i < uip_datalen(); ++i) { d = ((char *)uip_appdata)[i]; @@ -268,17 +268,17 @@ acked(struct ftp_connection *c) static void senddata(struct ftp_connection *c) { - u16_t len; + uint16_t len; switch(c->state) { case STATE_SEND_USER: - len = 5 + (u16_t)strlen(ftpc_username()) + 2; + len = 5 + (uint16_t)strlen(ftpc_username()) + 2; strcpy(uip_appdata, "USER "); strncpy((char *)uip_appdata + 5, ftpc_username(), uip_mss() - 5 - 2); strcpy((char *)uip_appdata + len - 2, "\r\n"); break; case STATE_SEND_PASS: - len = 5 + (u16_t)strlen(ftpc_password()) + 2; + len = 5 + (uint16_t)strlen(ftpc_password()) + 2; strcpy(uip_appdata, "PASS "); strncpy((char *)uip_appdata + 5, ftpc_password(), uip_mss() - 5 - 2); strcpy((char *)uip_appdata + len - 2, "\r\n"); @@ -290,7 +290,7 @@ senddata(struct ftp_connection *c) (c->dataconn.port) & 0xff); break; case STATE_SEND_OPTIONS: - len = (u16_t)strlen(options.commands[c->optionsptr]); + len = (uint16_t)strlen(options.commands[c->optionsptr]); strcpy(uip_appdata, options.commands[c->optionsptr]); break; case STATE_SEND_NLST: diff --git a/apps/ftp/ftpc.h b/apps/ftp/ftpc.h index 67e76e6af..f1f60392d 100644 --- a/apps/ftp/ftpc.h +++ b/apps/ftp/ftpc.h @@ -39,7 +39,7 @@ void ftpc_init(void); -void *ftpc_connect(uip_ipaddr_t *ipaddr, u16_t port); +void *ftpc_connect(uip_ipaddr_t *ipaddr, uint16_t port); char ftpc_list(void *connection); void ftpc_cwd(void *connection, char *dir); void ftpc_cdup(void *connection); @@ -63,6 +63,6 @@ void ftpc_closed(void); void ftpc_aborted(void); void ftpc_timedout(void); void ftpc_list_file(char *filename); -void ftpc_data(u8_t *data, u16_t len); +void ftpc_data(uint8_t *data, uint16_t len); #endif /* __FTPC_H__ */ diff --git a/apps/netconf/netconf.c b/apps/netconf/netconf.c index 62dc3239d..59ba3aa47 100644 --- a/apps/netconf/netconf.c +++ b/apps/netconf/netconf.c @@ -73,7 +73,7 @@ static void makestrings(void); /*-----------------------------------------------------------------------------------*/ static char * -makebyte(u8_t byte, char *str) +makebyte(uint8_t byte, char *str) { if(byte >= 100) { *str++ = (byte / 100 ) % 10 + '0'; diff --git a/apps/ping6/ping6.c b/apps/ping6/ping6.c index 369c001be..e2d5806c6 100644 --- a/apps/ping6/ping6.c +++ b/apps/ping6/ping6.c @@ -42,7 +42,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",lladdr->addr[0], lladdr->addr[1], lladdr->addr[2], lladdr->addr[3],lladdr->addr[4], lladdr->addr[5]) #else #define PRINTF(...) @@ -56,9 +56,9 @@ #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) static struct etimer ping6_periodic_timer; -static u8_t count = 0; +static uint8_t count = 0; static char command[20]; -static u16_t addr[8]; +static uint16_t addr[8]; uip_ipaddr_t dest_addr; PROCESS(ping6_process, "PING6 process"); @@ -66,7 +66,7 @@ AUTOSTART_PROCESSES(&ping6_process); /*---------------------------------------------------------------------------*/ -static u8_t +static uint8_t ping6handler(process_event_t ev, process_data_t data) { if(count == 0){ @@ -130,8 +130,8 @@ ping6handler(process_event_t ev, process_data_t data) uip_len = UIP_ICMPH_LEN + UIP_ICMP6_ECHO_REQUEST_LEN + UIP_IPH_LEN + PING6_DATALEN; - UIP_IP_BUF->len[0] = (u8_t)((uip_len - 40) >> 8); - UIP_IP_BUF->len[1] = (u8_t)((uip_len - 40) & 0x00FF); + UIP_IP_BUF->len[0] = (uint8_t)((uip_len - 40) >> 8); + UIP_IP_BUF->len[1] = (uint8_t)((uip_len - 40) & 0x00FF); UIP_ICMP_BUF->icmpchksum = 0; UIP_ICMP_BUF->icmpchksum = ~uip_icmp6chksum(); @@ -157,7 +157,7 @@ ping6handler(process_event_t ev, process_data_t data) PROCESS_THREAD(ping6_process, ev, data) { - u8_t cont = 1; + uint8_t cont = 1; PROCESS_BEGIN(); PRINTF("In Process PING6\n"); diff --git a/apps/rest-coap/coap-common.c b/apps/rest-coap/coap-common.c index deb4e222e..0ddff495d 100644 --- a/apps/rest-coap/coap-common.c +++ b/apps/rest-coap/coap-common.c @@ -30,7 +30,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/rest-coap/coap-server.c b/apps/rest-coap/coap-server.c index 2fb944325..6f20e364c 100644 --- a/apps/rest-coap/coap-server.c +++ b/apps/rest-coap/coap-server.c @@ -20,7 +20,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) @@ -420,10 +420,10 @@ handle_incoming_data(void) int error=NO_ERROR; char buf[MAX_PAYLOAD_LEN]; - PRINTF("uip_datalen received %u \n",(u16_t)uip_datalen()); + PRINTF("uip_datalen received %u \n",(uint16_t)uip_datalen()); char* data = (char *)uip_appdata + uip_ext_len; - u16_t datalen = uip_datalen() - uip_ext_len; + uint16_t datalen = uip_datalen() - uip_ext_len; int data_size = 0; diff --git a/apps/rest-common/rest.c b/apps/rest-common/rest.c index c1b383c44..b28ae1bd5 100644 --- a/apps/rest-common/rest.c +++ b/apps/rest-common/rest.c @@ -7,7 +7,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/rest-common/static-routing.c b/apps/rest-common/static-routing.c index 91cff3719..1be139f89 100644 --- a/apps/rest-common/static-routing.c +++ b/apps/rest-common/static-routing.c @@ -13,7 +13,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/rest-http/http-server.c b/apps/rest-http/http-server.c index 26385b493..256e37904 100644 --- a/apps/rest-http/http-server.c +++ b/apps/rest-http/http-server.c @@ -15,7 +15,7 @@ #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) #else #define PRINTF(...) diff --git a/apps/servreg-hack/servreg-hack.c b/apps/servreg-hack/servreg-hack.c index 8a0165f2c..fdc68f238 100644 --- a/apps/servreg-hack/servreg-hack.c +++ b/apps/servreg-hack/servreg-hack.c @@ -330,7 +330,7 @@ send_udp_packet(struct uip_udp_conn *conn) } /*---------------------------------------------------------------------------*/ static void -parse_incoming_packet(const u8_t *buf, int len) +parse_incoming_packet(const uint8_t *buf, int len) { int numregs; int flags; diff --git a/apps/shell/shell-ping.c b/apps/shell/shell-ping.c index 4957a4fa7..4568e2861 100644 --- a/apps/shell/shell-ping.c +++ b/apps/shell/shell-ping.c @@ -85,8 +85,8 @@ send_ping(uip_ipaddr_t *dest_addr) uip_len = UIP_ICMPH_LEN + UIP_ICMP6_ECHO_REQUEST_LEN + UIP_IPH_LEN + PING_DATALEN; - UIP_IP_BUF->len[0] = (u8_t)((uip_len - 40) >> 8); - UIP_IP_BUF->len[1] = (u8_t)((uip_len - 40) & 0x00ff); + UIP_IP_BUF->len[0] = (uint8_t)((uip_len - 40) >> 8); + UIP_IP_BUF->len[1] = (uint8_t)((uip_len - 40) & 0x00ff); UIP_ICMP_BUF->icmpchksum = 0; UIP_ICMP_BUF->icmpchksum = ~uip_icmp6chksum(); @@ -116,11 +116,11 @@ send_ping(uip_ipaddr_t *dest_addr) UIP_ICMP_BUF->seqno = uip_htons(seqno++); uip_len = UIP_ICMPH_LEN + UIP_IPH_LEN + PING_DATALEN; - UIP_IP_BUF->len[0] = (u8_t)((uip_len) >> 8); - UIP_IP_BUF->len[1] = (u8_t)((uip_len) & 0x00ff); + UIP_IP_BUF->len[0] = (uint8_t)((uip_len) >> 8); + UIP_IP_BUF->len[1] = (uint8_t)((uip_len) & 0x00ff); UIP_ICMP_BUF->icmpchksum = 0; - UIP_ICMP_BUF->icmpchksum = ~uip_chksum((u16_t *)&(UIP_ICMP_BUF->type), + UIP_ICMP_BUF->icmpchksum = ~uip_chksum((uint16_t *)&(UIP_ICMP_BUF->type), UIP_ICMPH_LEN + PING_DATALEN); /* Calculate IP checksum. */ diff --git a/apps/shell/shell-rime-ping.c b/apps/shell/shell-rime-ping.c index 2fa0286df..ff8869d01 100644 --- a/apps/shell/shell-rime-ping.c +++ b/apps/shell/shell-rime-ping.c @@ -123,7 +123,7 @@ sent_mesh(struct mesh_conn *c) { } static void -recv_mesh(struct mesh_conn *c, const rimeaddr_t *from, u8_t hops) +recv_mesh(struct mesh_conn *c, const rimeaddr_t *from, uint8_t hops) { struct rime_ping_msg ping; char buf[64]; diff --git a/apps/shell/shell-rime.c b/apps/shell/shell-rime.c index 9a8d4a2fd..0403e3ecf 100644 --- a/apps/shell/shell-rime.c +++ b/apps/shell/shell-rime.c @@ -293,7 +293,7 @@ PROCESS_THREAD(shell_send_process, ev, data) } /*---------------------------------------------------------------------------*/ static void -recv_collect(const rimeaddr_t *originator, u8_t seqno, u8_t hops) +recv_collect(const rimeaddr_t *originator, uint8_t seqno, uint8_t hops) { struct collect_msg collect_msg; char *dataptr; diff --git a/apps/shell/shell-tcpsend.c b/apps/shell/shell-tcpsend.c index 019ca3b12..166cb5b08 100644 --- a/apps/shell/shell-tcpsend.c +++ b/apps/shell/shell-tcpsend.c @@ -82,7 +82,7 @@ telnet_text_output(struct telnet_state *s, char *text1, char *text2) } /*---------------------------------------------------------------------------*/ void -telnet_newdata(struct telnet_state *s, char *data, u16_t len) +telnet_newdata(struct telnet_state *s, char *data, uint16_t len) { shell_output(&tcpsend_command, data, len, "", 0); } diff --git a/apps/shell/shell-wget.c b/apps/shell/shell-wget.c index b52383391..401807fb1 100644 --- a/apps/shell/shell-wget.c +++ b/apps/shell/shell-wget.c @@ -191,7 +191,7 @@ shell_wget_init(void) } /*---------------------------------------------------------------------------*/ void -webclient_datahandler(char *data, u16_t len) +webclient_datahandler(char *data, uint16_t len) { if(len == 0) { running = 0; diff --git a/apps/telnet/simpletelnet.c b/apps/telnet/simpletelnet.c index 1efc45f3e..cbd744dd7 100644 --- a/apps/telnet/simpletelnet.c +++ b/apps/telnet/simpletelnet.c @@ -152,7 +152,7 @@ static void connect(void) { uip_ipaddr_t addr, *addrptr; - u16_t port; + uint16_t port; char *cptr; struct uip_conn *conn; @@ -310,7 +310,7 @@ telnet_timedout(struct telnet_state *s) } /*-----------------------------------------------------------------------------------*/ void -telnet_newdata(struct telnet_state *s, char *data, u16_t len) +telnet_newdata(struct telnet_state *s, char *data, uint16_t len) { petsciiconv_topetscii(data, len); data[len] = 0; diff --git a/apps/telnet/telnet.c b/apps/telnet/telnet.c index 8e7debc39..95ee9d059 100644 --- a/apps/telnet/telnet.c +++ b/apps/telnet/telnet.c @@ -44,7 +44,7 @@ #define FLAG_ABORT 2 /*-----------------------------------------------------------------------------------*/ unsigned char -telnet_send(struct telnet_state *s, char *text, u16_t len) +telnet_send(struct telnet_state *s, char *text, uint16_t len) { if(s->text != NULL) { return 1; @@ -104,7 +104,7 @@ senddata(struct telnet_state *s) } /*-----------------------------------------------------------------------------------*/ struct telnet_state * -telnet_connect(struct telnet_state *s, uip_ipaddr_t *addr, u16_t port) +telnet_connect(struct telnet_state *s, uip_ipaddr_t *addr, uint16_t port) { struct uip_conn *conn; diff --git a/apps/telnet/telnet.h b/apps/telnet/telnet.h index cb888a5a3..638b0c4f4 100644 --- a/apps/telnet/telnet.h +++ b/apps/telnet/telnet.h @@ -39,16 +39,16 @@ struct telnet_state { unsigned char flags; char *text; - u16_t textlen; - u16_t sentlen; + uint16_t textlen; + uint16_t sentlen; }; /*DISPATCHER_UIPCALL(telnet_app, s);*/ void telnet_app(void *s); -unsigned char telnet_send(struct telnet_state *s, char *text, u16_t len); +unsigned char telnet_send(struct telnet_state *s, char *text, uint16_t len); unsigned char telnet_close(struct telnet_state *s); unsigned char telnet_abort(struct telnet_state *s); -struct telnet_state *telnet_connect(struct telnet_state *s, uip_ipaddr_t *addr, u16_t port); +struct telnet_state *telnet_connect(struct telnet_state *s, uip_ipaddr_t *addr, uint16_t port); /* Callbacks, implemented by the caller. */ @@ -57,5 +57,5 @@ void telnet_closed(struct telnet_state *s); void telnet_sent(struct telnet_state *s); void telnet_aborted(struct telnet_state *s); void telnet_timedout(struct telnet_state *s); -void telnet_newdata(struct telnet_state *s, char *data, u16_t len); +void telnet_newdata(struct telnet_state *s, char *data, uint16_t len); #endif /* __TELNET_H__ */ diff --git a/apps/telnetd/telnetd.c b/apps/telnetd/telnetd.c index 1ee7bd586..d994629db 100644 --- a/apps/telnetd/telnetd.c +++ b/apps/telnetd/telnetd.c @@ -66,7 +66,7 @@ struct telnetd_state { char buf[TELNETD_CONF_LINELEN + 1]; char bufptr; uint16_t numsent; - u8_t state; + uint8_t state; #define STATE_NORMAL 0 #define STATE_IAC 1 #define STATE_WILL 2 @@ -239,7 +239,7 @@ senddata(void) } /*---------------------------------------------------------------------------*/ static void -get_char(u8_t c) +get_char(uint8_t c) { PRINTF("telnetd: get_char '%c' %d %d\n", c, c, s.bufptr); @@ -264,7 +264,7 @@ get_char(u8_t c) } /*---------------------------------------------------------------------------*/ static void -sendopt(u8_t option, u8_t value) +sendopt(uint8_t option, uint8_t value) { char line[4]; line[0] = (char)TELNET_IAC; @@ -278,8 +278,8 @@ sendopt(u8_t option, u8_t value) static void newdata(void) { - u16_t len; - u8_t c; + uint16_t len; + uint8_t c; uint8_t *ptr; len = uip_datalen(); diff --git a/apps/vnc/vnc-draw.h b/apps/vnc/vnc-draw.h index e6bc3947e..ec806a3b9 100644 --- a/apps/vnc/vnc-draw.h +++ b/apps/vnc/vnc-draw.h @@ -39,7 +39,7 @@ #include "net/uip_arch.h" /* Pointer to the bitmap area in memory. */ -extern u8_t vnc_draw_bitmap[]; +extern uint8_t vnc_draw_bitmap[]; /* Initialize the vnc-draw module. */ void vnc_draw_init(void); @@ -48,14 +48,14 @@ void vnc_draw_init(void); given by the "data" argument and the length of data is given by the "datalen" argument. The data format is one pixel per byte in bgr233 format (bbgggrrr). */ -void vnc_draw_pixelline(u16_t x, u16_t y, - u8_t *data, u16_t datalen); +void vnc_draw_pixelline(uint16_t x, uint16_t y, + uint8_t *data, uint16_t datalen); /* The following functions should return the x and y coordinates and the width and height of the viewport. */ -u16_t vnc_draw_viewport_x(void); -u16_t vnc_draw_viewport_y(void); -u16_t vnc_draw_viewport_w(void); -u16_t vnc_draw_viewport_h(void); +uint16_t vnc_draw_viewport_x(void); +uint16_t vnc_draw_viewport_y(void); +uint16_t vnc_draw_viewport_w(void); +uint16_t vnc_draw_viewport_h(void); #endif /* __VNC_DRAW_H__ */ diff --git a/apps/vnc/vnc-viewer.c b/apps/vnc/vnc-viewer.c index b83d2c63a..b4cd36878 100644 --- a/apps/vnc/vnc-viewer.c +++ b/apps/vnc/vnc-viewer.c @@ -48,7 +48,7 @@ #define RFB_SERVER_VERSION_STRING rfb_server_version_string /* "RFB 003.003" */ -static u8_t rfb_server_version_string[12] = +static uint8_t rfb_server_version_string[12] = {82,70,66,32,48,48,51,46,48,48,51,10}; #if 0 @@ -77,7 +77,7 @@ vnc_viewer_close(void) } /*-----------------------------------------------------------------------------------*/ void -vnc_viewer_connect(u16_t *server, u8_t display) +vnc_viewer_connect(uint16_t *server, uint8_t display) { struct uip_conn *conn; @@ -96,10 +96,10 @@ vnc_viewer_connect(u16_t *server, u8_t display) static void senddata(void) { - register u8_t *dataptr; - u16_t dataleft; + register uint8_t *dataptr; + uint16_t dataleft; - dataptr = (u8_t *)uip_appdata; + dataptr = (uint8_t *)uip_appdata; switch(vs->sendmsg) { case VNC_SEND_VERSION: @@ -115,7 +115,7 @@ senddata(void) case VNC_SEND_CINIT: PRINTF(("Sending CINIT\n")); /* Send one byte of client init. */ - *(u8_t *)dataptr = 1; + *(uint8_t *)dataptr = 1; uip_send(uip_appdata, 1); break; case VNC_SEND_PFMT: @@ -144,10 +144,10 @@ senddata(void) dataptr += sizeof(struct rfb_set_encodings); dataptr[0] = dataptr[1] = dataptr[2] = 0; dataptr[3] = RFB_ENC_RAW; - /* ((u8_t *)dataptr + sizeof(struct rfb_set_encodings))[4] = - ((u8_t *)dataptr + sizeof(struct rfb_set_encodings))[5] = - ((u8_t *)dataptr + sizeof(struct rfb_set_encodings))[6] = 0; - ((u8_t *)dataptr + sizeof(struct rfb_set_encodings))[7] = RFB_ENC_RRE;*/ + /* ((uint8_t *)dataptr + sizeof(struct rfb_set_encodings))[4] = + ((uint8_t *)dataptr + sizeof(struct rfb_set_encodings))[5] = + ((uint8_t *)dataptr + sizeof(struct rfb_set_encodings))[6] = 0; + ((uint8_t *)dataptr + sizeof(struct rfb_set_encodings))[7] = RFB_ENC_RRE;*/ uip_send(uip_appdata, sizeof(struct rfb_set_encodings) + 4); break; case VNC_SEND_UPDATERQ: @@ -230,7 +230,7 @@ senddata(void) } /*-----------------------------------------------------------------------------------*/ static void -buffer_data(u8_t *data, u16_t datalen) +buffer_data(uint8_t *data, uint16_t datalen) { PRINTF(("Buffering %d bytes of data\n", datalen)); @@ -254,11 +254,11 @@ clearbuffer(void) } /*-----------------------------------------------------------------------------------*/ /* Returns: the amount of bytes actually read. */ -static u16_t -recv_rectstate(u8_t *dataptr, u16_t datalen) +static uint16_t +recv_rectstate(uint8_t *dataptr, uint16_t datalen) { - u16_t pixels; - u16_t pixelsleft; + uint16_t pixels; + uint16_t pixelsleft; switch(vs->rectstate) { case VNC_RECTSTATE_RAW: @@ -309,7 +309,7 @@ recv_rectstate(u8_t *dataptr, u16_t datalen) rect can be drawn. */ static unsigned short recv_update_rect(CC_REGISTER_ARG struct rfb_fb_update_rect_hdr *rhdr, - u16_t dataleft) + uint16_t dataleft) { struct rfb_rre_hdr *rrehdr; @@ -319,7 +319,7 @@ recv_update_rect(CC_REGISTER_ARG struct rfb_fb_update_rect_hdr *rhdr, rhdr->encoding[2]) == 0) { switch(rhdr->encoding[3]) { case RFB_ENC_RAW: - vs->rectstateleft = (u32_t)uip_htons(rhdr->rect.w) * (u32_t)uip_htons(rhdr->rect.h); + vs->rectstateleft = (uint32_t)uip_htons(rhdr->rect.w) * (uint32_t)uip_htons(rhdr->rect.h); vs->rectstate = VNC_RECTSTATE_RAW; vs->rectstatex0 = vs->rectstatex = uip_htons(rhdr->rect.x); vs->rectstatey0 = vs->rectstatey = uip_htons(rhdr->rect.y); @@ -330,14 +330,14 @@ recv_update_rect(CC_REGISTER_ARG struct rfb_fb_update_rect_hdr *rhdr, break; case RFB_ENC_RRE: - rrehdr = (struct rfb_rre_hdr *)((u8_t *)rhdr + + rrehdr = (struct rfb_rre_hdr *)((uint8_t *)rhdr + sizeof(struct rfb_fb_update_rect_hdr)); PRINTF(("Received RRE subrects %d (%d)\n", (uip_htons(rrehdr->subrects[1]) << 16) + uip_htons(rrehdr->subrects[0]), rrehdr->bgpixel)); - vs->rectstateleft = ((u32_t)(uip_htons(rrehdr->subrects[1]) << 16) + - (u32_t)uip_htons(rrehdr->subrects[0])); + vs->rectstateleft = ((uint32_t)(uip_htons(rrehdr->subrects[1]) << 16) + + (uint32_t)uip_htons(rrehdr->subrects[0])); vs->rectstate = VNC_RECTSTATE_RRE; break; @@ -363,8 +363,8 @@ recv_update_rect(CC_REGISTER_ARG struct rfb_fb_update_rect_hdr *rhdr, * incoming message and returns the number of bytes of data that is to * be expected. */ -static u16_t -identify_data(CC_REGISTER_ARG u8_t *data, u16_t datalen) +static uint16_t +identify_data(CC_REGISTER_ARG uint8_t *data, uint16_t datalen) { switch(vs->waitmsg) { case VNC_WAIT_VERSION: @@ -405,7 +405,7 @@ identify_data(CC_REGISTER_ARG u8_t *data, u16_t datalen) default: uip_abort(); - PRINTF(("Weird message type received (%d)\n", *(u8_t *)uip_appdata)); + PRINTF(("Weird message type received (%d)\n", *(uint8_t *)uip_appdata)); return 0; } break; @@ -425,7 +425,7 @@ identify_data(CC_REGISTER_ARG u8_t *data, u16_t datalen) * Handles the data. */ static unsigned short -handle_data(CC_REGISTER_ARG u8_t *data, u16_t datalen) +handle_data(CC_REGISTER_ARG uint8_t *data, uint16_t datalen) { switch(vs->waitmsg) { @@ -461,7 +461,7 @@ handle_data(CC_REGISTER_ARG u8_t *data, u16_t datalen) uip_htons(((struct rfb_server_init *)data)->height), ((struct rfb_server_init *)data)->format.bps, ((struct rfb_server_init *)data)->format.depth, - ((u8_t *)data + sizeof(struct rfb_server_init))));*/ + ((uint8_t *)data + sizeof(struct rfb_server_init))));*/ vs->w = uip_htons(((struct rfb_server_init *)data)->width); vs->h = uip_htons(((struct rfb_server_init *)data)->height); vs->sendmsg = VNC_SEND_PFMT; @@ -490,7 +490,7 @@ handle_data(CC_REGISTER_ARG u8_t *data, u16_t datalen) break; default: - PRINTF(("Weird message type received (%d)\n", *(u8_t *)data)); + PRINTF(("Weird message type received (%d)\n", *(uint8_t *)data)); break; } break; @@ -525,15 +525,15 @@ handle_data(CC_REGISTER_ARG u8_t *data, u16_t datalen) * care of the next time this function is invoked (i.e., for the next * incoming data chunk). */ -static u8_t +static uint8_t newdata(void) { - u16_t datalen; - u16_t readlen; - u8_t *dataptr; + uint16_t datalen; + uint16_t readlen; + uint8_t *dataptr; datalen = uip_datalen(); - dataptr = (u8_t *)uip_appdata; + dataptr = (uint8_t *)uip_appdata; PRINTF(("newdata: %d bytes\n", datalen)); @@ -558,7 +558,7 @@ newdata(void) sequence for the data that is left in the incoming chunk. */ datalen -= vs->bufferleft; dataptr += vs->bufferleft; - buffer_data((u8_t *)uip_appdata, vs->bufferleft); + buffer_data((uint8_t *)uip_appdata, vs->bufferleft); handle_data(vs->buffer, vs->buffersize); clearbuffer(); } else { /* datalen < vs->bufferleft */ @@ -710,9 +710,9 @@ vnc_viewer_appcall(void * nullptr) } /*-----------------------------------------------------------------------------------*/ void -vnc_viewer_post_event(u8_t type, - u16_t data1, u16_t data2, - u16_t data3, u16_t data4) +vnc_viewer_post_event(uint8_t type, + uint16_t data1, uint16_t data2, + uint16_t data3, uint16_t data4) { register struct vnc_event *ev; struct vnc_event *ev0; diff --git a/apps/vnc/vnc-viewer.h b/apps/vnc/vnc-viewer.h index 443748e9e..2ae97c682 100644 --- a/apps/vnc/vnc-viewer.h +++ b/apps/vnc/vnc-viewer.h @@ -39,12 +39,12 @@ struct vnc_viewer_state; -/*typedef unsigned long u32_t;*/ +/*typedef unsigned long uint32_t;*/ void vnc_viewer_init(void); void vnc_viewer_appcall(void *nullptr); -void vnc_viewer_connect(u16_t *server, u8_t display); +void vnc_viewer_connect(uint16_t *server, uint8_t display); void vnc_viewer_close(void); /* Callback: redraws the VNC viewer bitmap area. */ @@ -63,9 +63,9 @@ void vnc_viewer_refresh(void); #define VNC_VIEWER_POST_UPDATERQ_EVENT(x1,y1,x2,y2) \ vnc_viewer_post_event(VNC_UPDATERQ_EVENT, x1, y1, x2, y2) -void vnc_viewer_post_event(u8_t event, - u16_t data1, u16_t data2, - u16_t data3, u16_t data4); +void vnc_viewer_post_event(uint8_t event, + uint16_t data1, uint16_t data2, + uint16_t data3, uint16_t data4); /* UIP_APPCALL: the name of the application function. This function must return void and take no arguments (i.e., C type "void @@ -75,22 +75,22 @@ void vnc_viewer_post_event(u8_t event, #endif struct vnc_key_event { - u8_t down; - u16_t key; + uint8_t down; + uint16_t key; }; struct vnc_pointer_event { - u8_t buttonmask; - u16_t x, y; + uint8_t buttonmask; + uint16_t x, y; }; struct vnc_updaterq_event { - u16_t x, y; - u16_t w, h; + uint16_t x, y; + uint16_t w, h; }; struct vnc_event { - u8_t type; + uint8_t type; union { struct vnc_key_event key; struct vnc_pointer_event ptr; @@ -133,34 +133,34 @@ enum vnc_rectstate { }; struct vnc_viewer_state { - u8_t close; - u16_t w, h; + uint8_t close; + uint16_t w, h; - u8_t sendmsg; + uint8_t sendmsg; - u8_t waitmsg; + uint8_t waitmsg; - u16_t rectsleft; + uint16_t rectsleft; - u8_t rectstate; - u32_t rectstateleft; - u16_t rectstatex, rectstatey; - u16_t rectstateh, rectstatew; - u16_t rectstatex0, rectstatey0; - u16_t rectstatex2, rectstatey2; + uint8_t rectstate; + uint32_t rectstateleft; + uint16_t rectstatex, rectstatey; + uint16_t rectstateh, rectstatew; + uint16_t rectstatex0, rectstatey0; + uint16_t rectstatex2, rectstatey2; - u16_t eventptr_acked; - u16_t eventptr_unacked; - u16_t eventptr_next; + uint16_t eventptr_acked; + uint16_t eventptr_unacked; + uint16_t eventptr_next; #define VNC_EVENTQUEUE_SIZE 32 struct vnc_event event_queue[VNC_EVENTQUEUE_SIZE]; - u16_t bufferleft; - u16_t buffersize; + uint16_t bufferleft; + uint16_t buffersize; #define VNC_BUFFERSIZE 64 - u8_t buffer[VNC_BUFFERSIZE]; + uint8_t buffer[VNC_BUFFERSIZE]; }; extern static struct vnc_viewer_state vnc_viewer_state; @@ -173,25 +173,25 @@ extern static struct vnc_viewer_state vnc_viewer_state; /* Generic rectangle - x, y coordinates, width and height. */ struct rfb_rect { - u16_t x; - u16_t y; - u16_t w; - u16_t h; + uint16_t x; + uint16_t y; + uint16_t w; + uint16_t h; }; /* Pixel format definition. */ struct rfb_pixel_format { - u8_t bps; /* Bits per pixel: 8, 16 or 32. */ - u8_t depth; /* Color depth: 8-32 */ - u8_t endian; /* 1 - big endian (motorola), 0 - little endian + uint8_t bps; /* Bits per pixel: 8, 16 or 32. */ + uint8_t depth; /* Color depth: 8-32 */ + uint8_t endian; /* 1 - big endian (motorola), 0 - little endian (x86) */ - u8_t truecolor; /* 1 - true color is used, 0 - true color is not used. */ + uint8_t truecolor; /* 1 - true color is used, 0 - true color is not used. */ /* The following fields are only used if true color is used. */ - u16_t red_max, green_max, blue_max; - u8_t red_shift, green_shift, blue_shift; - u8_t pad1; - u16_t pad2; + uint16_t red_max, green_max, blue_max; + uint8_t red_shift, green_shift, blue_shift; + uint8_t pad1; + uint16_t pad2; }; @@ -234,94 +234,94 @@ struct rfb_pixel_format { /* Server to client messages. */ struct rfb_server_init { - u16_t width; - u16_t height; + uint16_t width; + uint16_t height; struct rfb_pixel_format format; - u8_t namelength[4]; + uint8_t namelength[4]; /* Followed by name. */ }; struct rfb_fb_update { - u8_t type; - u8_t pad; - u16_t rects; /* Number of rectanges (struct rfb_fb_update_rect_hdr + + uint8_t type; + uint8_t pad; + uint16_t rects; /* Number of rectanges (struct rfb_fb_update_rect_hdr + data) that follows. */ }; struct rfb_fb_update_rect_hdr { struct rfb_rect rect; - u8_t encoding[4]; + uint8_t encoding[4]; }; struct rfb_copy_rect { - u16_t srcx; - u16_t srcy; + uint16_t srcx; + uint16_t srcy; }; struct rfb_rre_hdr { - u16_t subrects[2]; /* Number of subrectangles (struct + uint16_t subrects[2]; /* Number of subrectangles (struct rfb_rre_subrect) to follow. */ - u8_t bgpixel; + uint8_t bgpixel; }; struct rfb_rre_subrect { - u8_t pixel; + uint8_t pixel; struct rfb_rect rect; }; struct rfb_corre_rect { - u8_t x; - u8_t y; - u8_t w; - u8_t h; + uint8_t x; + uint8_t y; + uint8_t w; + uint8_t h; }; /* Client to server messages. */ struct rfb_set_pixel_format { - u8_t type; - u8_t pad; - u16_t pad2; + uint8_t type; + uint8_t pad; + uint16_t pad2; struct rfb_pixel_format format; }; struct rfb_fix_colormap_entries { - u8_t type; - u8_t pad; - u16_t firstcolor; - u16_t colors; + uint8_t type; + uint8_t pad; + uint16_t firstcolor; + uint16_t colors; }; struct rfb_set_encodings { - u8_t type; - u8_t pad; - u16_t encodings; + uint8_t type; + uint8_t pad; + uint16_t encodings; }; struct rfb_fb_update_request { - u8_t type; - u8_t incremental; - u16_t x; - u16_t y; - u16_t w; - u16_t h; + uint8_t type; + uint8_t incremental; + uint16_t x; + uint16_t y; + uint16_t w; + uint16_t h; }; struct rfb_key_event { - u8_t type; - u8_t down; - u16_t pad; - u8_t key[4]; + uint8_t type; + uint8_t down; + uint16_t pad; + uint8_t key[4]; }; #define RFB_BUTTON_MASK1 1 #define RFB_BUTTON_MASK2 2 #define RFB_BUTTON_MASK3 4 struct rfb_pointer_event { - u8_t type; - u8_t buttonmask; - u16_t x; - u16_t y; + uint8_t type; + uint8_t buttonmask; + uint16_t x; + uint16_t y; }; #endif /* __VNC_VIEWER_H__ */ diff --git a/apps/vnc/vnc.c b/apps/vnc/vnc.c index 71be06bd2..2618f423f 100644 --- a/apps/vnc/vnc.c +++ b/apps/vnc/vnc.c @@ -125,7 +125,7 @@ static void connect(void) { uip_ipaddr_t addr, *addrptr; - u16_t port; + uint16_t port; char *cptr; /* Find the first space character in host and put a zero there diff --git a/apps/webbrowser/htmlparser.c b/apps/webbrowser/htmlparser.c index c91ff5321..ed5c53e74 100644 --- a/apps/webbrowser/htmlparser.c +++ b/apps/webbrowser/htmlparser.c @@ -553,11 +553,11 @@ parse_tag(void) } } /*-----------------------------------------------------------------------------------*/ -static u16_t -parse_word(char *data, u8_t dlen) +static uint16_t +parse_word(char *data, uint8_t dlen) { - static u8_t i; - static u8_t len; + static uint8_t i; + static uint8_t len; unsigned char c; len = dlen; @@ -825,15 +825,15 @@ parse_word(char *data, u8_t dlen) } /*-----------------------------------------------------------------------------------*/ void -htmlparser_parse(char *data, u16_t datalen) +htmlparser_parse(char *data, uint16_t datalen) { - u16_t plen; + uint16_t plen; while(datalen > 0) { if(datalen > 255) { plen = parse_word(data, 255); } else { - plen = parse_word(data, (u8_t)datalen); + plen = parse_word(data, (uint8_t)datalen); } datalen -= plen; data += plen; diff --git a/apps/webbrowser/htmlparser.h b/apps/webbrowser/htmlparser.h index d5047aedb..6a4e70275 100644 --- a/apps/webbrowser/htmlparser.h +++ b/apps/webbrowser/htmlparser.h @@ -73,7 +73,7 @@ void htmlparser_renderstate(unsigned char state); /* Functions. */ void htmlparser_init(void); -void htmlparser_parse(char *data, u16_t len); +void htmlparser_parse(char *data, uint16_t len); #endif /* __HTMLPARSER_H__ */ diff --git a/apps/webbrowser/webclient.c b/apps/webbrowser/webclient.c index 5f8f93fa9..3c68d39f5 100644 --- a/apps/webbrowser/webclient.c +++ b/apps/webbrowser/webclient.c @@ -58,18 +58,18 @@ #define ISO_space 0x20 struct webclient_state { - u8_t timer; - u8_t state; - u8_t httpflag; + uint8_t timer; + uint8_t state; + uint8_t httpflag; - u16_t port; + uint16_t port; char host[40]; char file[WWW_CONF_MAX_URLLEN]; - u16_t getrequestptr; - u16_t getrequestleft; + uint16_t getrequestptr; + uint16_t getrequestleft; char httpheaderline[200]; - u16_t httpheaderlineptr; + uint16_t httpheaderlineptr; char mimetype[32]; }; @@ -117,8 +117,8 @@ init_connection(void) sizeof(http_crnl) - 1 + sizeof(http_host) - 1 + sizeof(http_crnl) - 1 + - (u16_t)strlen(http_user_agent_fields) + - (u16_t)strlen(s.file) + (u16_t)strlen(s.host); + (uint16_t)strlen(http_user_agent_fields) + + (uint16_t)strlen(s.file) + (uint16_t)strlen(s.host); s.getrequestptr = 0; s.httpheaderlineptr = 0; @@ -131,7 +131,7 @@ webclient_close(void) } /*-----------------------------------------------------------------------------------*/ unsigned char -webclient_get(const char *host, u16_t port, const char *file) +webclient_get(const char *host, uint16_t port, const char *file) { uip_ipaddr_t addr; struct uip_conn *conn; @@ -212,7 +212,7 @@ window_copy(int curptr, const char *data, unsigned char datalen) static void senddata(void) { - u16_t len; + uint16_t len; int curptr; if(s.getrequestleft > 0) { @@ -246,7 +246,7 @@ senddata(void) static void acked(void) { - u16_t len; + uint16_t len; if(s.getrequestleft > 0) { len = s.getrequestleft > uip_mss()? @@ -257,8 +257,8 @@ acked(void) } } /*-----------------------------------------------------------------------------------*/ -static u16_t -parse_statusline(u16_t len) +static uint16_t +parse_statusline(uint16_t len) { char *cptr; @@ -324,8 +324,8 @@ casecmp(char *str1, const char *str2, char len) return 0; } /*-----------------------------------------------------------------------------------*/ -static u16_t -parse_headers(u16_t len) +static uint16_t +parse_headers(uint16_t len) { char *cptr; static unsigned char i; @@ -393,7 +393,7 @@ parse_headers(u16_t len) static void newdata(void) { - u16_t len; + uint16_t len; len = uip_datalen(); diff --git a/apps/webbrowser/webclient.h b/apps/webbrowser/webclient.h index a4a27f5af..40821690c 100644 --- a/apps/webbrowser/webclient.h +++ b/apps/webbrowser/webclient.h @@ -43,7 +43,7 @@ /* Callback functions that have to be implemented by the application program. */ struct webclient_state; -void webclient_datahandler(char *data, u16_t len); +void webclient_datahandler(char *data, uint16_t len); void webclient_connected(void); void webclient_timedout(void); void webclient_aborted(void); @@ -52,7 +52,7 @@ void webclient_closed(void); /* Functions. */ void webclient_init(void); -unsigned char webclient_get(const char *host, u16_t port, const char *file); +unsigned char webclient_get(const char *host, uint16_t port, const char *file); void webclient_close(void); void webclient_appcall(void *state); diff --git a/apps/webbrowser/www.c b/apps/webbrowser/www.c index ed28e145e..915969019 100644 --- a/apps/webbrowser/www.c +++ b/apps/webbrowser/www.c @@ -553,7 +553,7 @@ PROCESS_THREAD(www_process, ev, data) * text entry widget in the browser window). */ static void -set_url(char *host, u16_t port, char *file) +set_url(char *host, uint16_t port, char *file) { char *urlptr; @@ -636,7 +636,7 @@ webclient_connected(void) * has arrived. */ void -webclient_datahandler(char *data, u16_t len) +webclient_datahandler(char *data, uint16_t len) { if(len > 0) { if(strcmp(webclient_mimetype(), http_texthtml) == 0) { diff --git a/apps/webserver-nano/httpd-cgi.c b/apps/webserver-nano/httpd-cgi.c index 9d62bc5b9..4bfd9432b 100644 --- a/apps/webserver-nano/httpd-cgi.c +++ b/apps/webserver-nano/httpd-cgi.c @@ -273,7 +273,7 @@ generate_file_stats(void *arg) static const char httpd_cgi_filestat3[] HTTPD_STRING_ATTR = "%5u"; char tmp[20]; struct httpd_fsdata_file_noconst *f,fram; - u16_t i; + uint16_t i; unsigned short numprinted; /* Transfer arg from whichever flash that contains the html file to RAM */ httpd_fs_cpy(&tmp, s->u.ptr, 20); diff --git a/apps/webserver-nano/httpd-fs.c b/apps/webserver-nano/httpd-fs.c index c408c1294..3fb5ac30d 100644 --- a/apps/webserver-nano/httpd-fs.c +++ b/apps/webserver-nano/httpd-fs.c @@ -43,7 +43,7 @@ #include "httpd-fsdata.c" #if WEBSERVER_CONF_FILESTATS==1 -u16_t httpd_filecount[HTTPD_FS_NUMFILES]; +uint16_t httpd_filecount[HTTPD_FS_NUMFILES]; #endif /*-----------------------------------------------------------------------------------*/ void * @@ -52,7 +52,7 @@ httpd_fs_get_root() return (void *)HTTPD_FS_ROOT; } /*-----------------------------------------------------------------------------------*/ -u16_t +uint16_t httpd_fs_get_size() { return HTTPD_FS_SIZE; @@ -62,7 +62,7 @@ uint16_t httpd_fs_open(const char *name, struct httpd_fs_file *file) { #if WEBSERVER_CONF_FILESTATS - u16_t i = 0; + uint16_t i = 0; #endif struct httpd_fsdata_file_noconst *f,fram; @@ -105,7 +105,7 @@ void httpd_fs_init(void) { #if WEBSERVER_CONF_FILESTATS==1 - u16_t i; + uint16_t i; for(i = 0; i < HTTPD_FS_NUMFILES; i++) { httpd_filecount[i] = 0; } @@ -113,11 +113,11 @@ httpd_fs_init(void) } /*-----------------------------------------------------------------------------------*/ #if WEBSERVER_CONF_FILESTATS && 0 -u16_t +uint16_t httpd_fs_count(char *name) { struct httpd_fsdata_file_noconst *f; - u16_t i; + uint16_t i; i = 0; for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT; diff --git a/apps/webserver-nano/httpd-fs.h b/apps/webserver-nano/httpd-fs.h index de44abee7..49a8778ab 100644 --- a/apps/webserver-nano/httpd-fs.h +++ b/apps/webserver-nano/httpd-fs.h @@ -44,8 +44,8 @@ struct httpd_fs_file { uint16_t httpd_fs_open(const char *name, struct httpd_fs_file *file); #if WEBSERVER_CONF_FILESTATS -extern u16_t httpd_filecount[]; -u16_t httpd_fs_count(char *name); +extern uint16_t httpd_filecount[]; +uint16_t httpd_fs_count(char *name); void* httpd_fs_get_root(void); #endif diff --git a/apps/webserver-nano/httpd-fsdata.c b/apps/webserver-nano/httpd-fsdata.c index 8f211b437..486bbdc3d 100644 --- a/apps/webserver-nano/httpd-fsdata.c +++ b/apps/webserver-nano/httpd-fsdata.c @@ -101,7 +101,7 @@ struct httpd_fsdata_file { const char *data; //offset to coffee file data const int len; //length of file data #if HTTPD_FS_STATISTICS == 1 //not enabled since list is in PROGMEM - u16_t count; //storage for file statistics + uint16_t count; //storage for file statistics #endif } */ diff --git a/apps/webserver-nano/httpd-fsdata.h b/apps/webserver-nano/httpd-fsdata.h index 0d514bacf..c77fdd65d 100644 --- a/apps/webserver-nano/httpd-fsdata.h +++ b/apps/webserver-nano/httpd-fsdata.h @@ -44,7 +44,7 @@ struct httpd_fsdata_file { const int len; #ifdef HTTPD_FS_STATISTICS #if HTTPD_FS_STATISTICS == 1 - u16_t count; + uint16_t count; #endif /* HTTPD_FS_STATISTICS */ #endif /* HTTPD_FS_STATISTICS */ }; @@ -56,7 +56,7 @@ struct httpd_fsdata_file_noconst { int len; #ifdef HTTPD_FS_STATISTICS #if HTTPD_FS_STATISTICS == 1 - u16_t count; + uint16_t count; #endif /* HTTPD_FS_STATISTICS */ #endif /* HTTPD_FS_STATISTICS */ }; diff --git a/apps/webserver/httpd-fs.c b/apps/webserver/httpd-fs.c index e0909f633..c09131099 100644 --- a/apps/webserver/httpd-fs.c +++ b/apps/webserver/httpd-fs.c @@ -41,14 +41,14 @@ #include "httpd-fsdata.c" #if HTTPD_FS_STATISTICS -static u16_t count[HTTPD_FS_NUMFILES]; +static uint16_t count[HTTPD_FS_NUMFILES]; #endif /* HTTPD_FS_STATISTICS */ /*-----------------------------------------------------------------------------------*/ -static u8_t +static uint8_t httpd_fs_strcmp(const char *str1, const char *str2) { - u8_t i; + uint8_t i; i = 0; loop: @@ -70,7 +70,7 @@ int httpd_fs_open(const char *name, struct httpd_fs_file *file) { #if HTTPD_FS_STATISTICS - u16_t i = 0; + uint16_t i = 0; #endif /* HTTPD_FS_STATISTICS */ struct httpd_fsdata_file_noconst *f; @@ -98,7 +98,7 @@ void httpd_fs_init(void) { #if HTTPD_FS_STATISTICS - u16_t i; + uint16_t i; for(i = 0; i < HTTPD_FS_NUMFILES; i++) { count[i] = 0; } @@ -106,11 +106,11 @@ httpd_fs_init(void) } /*-----------------------------------------------------------------------------------*/ #if HTTPD_FS_STATISTICS -u16_t +uint16_t httpd_fs_count(char *name) { struct httpd_fsdata_file_noconst *f; - u16_t i; + uint16_t i; i = 0; for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT; diff --git a/apps/webserver/httpd-fs.h b/apps/webserver/httpd-fs.h index 9abed703c..f61b691ae 100644 --- a/apps/webserver/httpd-fs.h +++ b/apps/webserver/httpd-fs.h @@ -50,7 +50,7 @@ int httpd_fs_open(const char *name, struct httpd_fs_file *file); #ifdef HTTPD_FS_STATISTICS #if HTTPD_FS_STATISTICS == 1 -u16_t httpd_fs_count(char *name); +uint16_t httpd_fs_count(char *name); #endif /* HTTPD_FS_STATISTICS */ #endif /* HTTPD_FS_STATISTICS */ diff --git a/apps/webserver/httpd-fsdata.h b/apps/webserver/httpd-fsdata.h index 0d514bacf..c77fdd65d 100644 --- a/apps/webserver/httpd-fsdata.h +++ b/apps/webserver/httpd-fsdata.h @@ -44,7 +44,7 @@ struct httpd_fsdata_file { const int len; #ifdef HTTPD_FS_STATISTICS #if HTTPD_FS_STATISTICS == 1 - u16_t count; + uint16_t count; #endif /* HTTPD_FS_STATISTICS */ #endif /* HTTPD_FS_STATISTICS */ }; @@ -56,7 +56,7 @@ struct httpd_fsdata_file_noconst { int len; #ifdef HTTPD_FS_STATISTICS #if HTTPD_FS_STATISTICS == 1 - u16_t count; + uint16_t count; #endif /* HTTPD_FS_STATISTICS */ #endif /* HTTPD_FS_STATISTICS */ };