diff --git a/cpu/6502/ctk/ctk-mouse.c b/cpu/6502/ctk/ctk-mouse.c index b8183293d..cc2330631 100644 --- a/cpu/6502/ctk/ctk-mouse.c +++ b/cpu/6502/ctk/ctk-mouse.c @@ -44,7 +44,7 @@ #if CTK_CONF_MOUSE_SUPPORT static struct mouse_pos pos; -static u8_t okay; +static uint8_t okay; /*-----------------------------------------------------------------------------------*/ void diff --git a/cpu/6502/dhcp/dhcp-client.c b/cpu/6502/dhcp/dhcp-client.c index d9fc4c779..d74da6a50 100644 --- a/cpu/6502/dhcp/dhcp-client.c +++ b/cpu/6502/dhcp/dhcp-client.c @@ -77,7 +77,7 @@ AUTOSTART_PROCESSES(&dhcp_process); /*-----------------------------------------------------------------------------------*/ 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/cpu/6502/lib/config.c b/cpu/6502/lib/config.c index cc65c41c3..3c025a2fd 100644 --- a/cpu/6502/lib/config.c +++ b/cpu/6502/lib/config.c @@ -48,7 +48,7 @@ static char * CC_FASTCALL ipaddrtoa(uip_ipaddr_t *ipaddr, char *buffer) { char *ptr = buffer; - u8_t i; + uint8_t i; for(i = 0; i < 4; ++i) { *ptr = '.'; diff --git a/cpu/6502/net/ethernet-drv.c b/cpu/6502/net/ethernet-drv.c index 4a5231d42..1433040c3 100644 --- a/cpu/6502/net/ethernet-drv.c +++ b/cpu/6502/net/ethernet-drv.c @@ -44,7 +44,7 @@ PROCESS(ethernet_process, "Ethernet driver"); /*---------------------------------------------------------------------------*/ -u8_t +uint8_t ethernet_output(void) { uip_arp_out(); diff --git a/cpu/6502/net/ethernet-drv.h b/cpu/6502/net/ethernet-drv.h index 325e753f9..080d762c5 100644 --- a/cpu/6502/net/ethernet-drv.h +++ b/cpu/6502/net/ethernet-drv.h @@ -37,12 +37,12 @@ #include "contiki.h" struct ethernet_config { - u16_t addr; + uint16_t addr; char name[12+1]; }; PROCESS_NAME(ethernet_process); -u8_t ethernet_output(void); +uint8_t ethernet_output(void); #endif /* __ETHERNET_DRV_H__ */ diff --git a/cpu/6502/net/ethernet.c b/cpu/6502/net/ethernet.c index 1681436e0..cfa80aa7d 100644 --- a/cpu/6502/net/ethernet.c +++ b/cpu/6502/net/ethernet.c @@ -46,11 +46,11 @@ struct { char signature[4]; struct uip_eth_addr ethernet_address; - u8_t *buffer; - u16_t buffer_size; - void __fastcall__ (* init)(u16_t reg); - u16_t (* poll)(void); - void __fastcall__ (* send)(u16_t len); + uint8_t *buffer; + uint16_t buffer_size; + void __fastcall__ (* init)(uint16_t reg); + uint16_t (* poll)(void); + void __fastcall__ (* send)(uint16_t len); void (* exit)(void); } *module; @@ -63,7 +63,7 @@ ethernet_init(struct ethernet_config *config) #ifndef ETHERNET struct mod_ctrl module_control = {cfs_read}; - u8_t byte; + uint8_t byte; module_control.callerdata = cfs_open(config->name, CFS_READ); if(module_control.callerdata < 0) { @@ -103,7 +103,7 @@ ethernet_init(struct ethernet_config *config) uip_setethaddr(module->ethernet_address); } /*---------------------------------------------------------------------------*/ -u16_t +uint16_t ethernet_poll(void) { return module->poll(); diff --git a/cpu/6502/net/ethernet.h b/cpu/6502/net/ethernet.h index ed050b379..05b7578a2 100644 --- a/cpu/6502/net/ethernet.h +++ b/cpu/6502/net/ethernet.h @@ -37,7 +37,7 @@ #define __ETHERNET_H__ void CC_FASTCALL ethernet_init(struct ethernet_config *config); -u16_t ethernet_poll(void); +uint16_t ethernet_poll(void); void ethernet_send(void); void ethernet_exit(void); diff --git a/cpu/6502/net/uip_arch.c b/cpu/6502/net/uip_arch.c index 88a5bbe7f..1666c5144 100644 --- a/cpu/6502/net/uip_arch.c +++ b/cpu/6502/net/uip_arch.c @@ -43,7 +43,7 @@ /*-----------------------------------------------------------------------------------*/ #pragma optimize(push, off) void -uip_add32(u8_t *op32, u16_t op16) +uip_add32(uint8_t *op32, uint16_t op16) { asm("ldy #3"); asm("jsr ldaxysp"); @@ -71,12 +71,12 @@ uip_add32(u8_t *op32, u16_t op16) } #pragma optimize(pop) /*-----------------------------------------------------------------------------------*/ -static u16_t chksum_ptr, chksum_len, chksum_tmp; -static u8_t chksum_protocol; -static u16_t chksum(void); +static uint16_t chksum_ptr, chksum_len, chksum_tmp; +static uint8_t chksum_protocol; +static uint16_t chksum(void); /*-----------------------------------------------------------------------------------*/ #pragma optimize(push, off) -u16_t +uint16_t chksum(void) { asm("lda #0"); @@ -172,14 +172,14 @@ chksum(void) { } #pragma optimize(pop) /*-----------------------------------------------------------------------------------*/ -u16_t -uip_chksum(u16_t *buf, u16_t len) +uint16_t +uip_chksum(uint16_t *buf, uint16_t len) { /* unsigned long sum; sum = 0; - chksum_ptr = (u16_t)buf; + chksum_ptr = (uint16_t)buf; while(len >= 256) { chksum_len = 256; sum += chksum(); @@ -199,28 +199,28 @@ uip_chksum(u16_t *buf, u16_t len) return sum;*/ chksum_len = len; - chksum_ptr = (u16_t)buf; + chksum_ptr = (uint16_t)buf; return chksum(); } /*-----------------------------------------------------------------------------------*/ -u16_t +uint16_t uip_ipchksum(void) { - chksum_ptr = (u16_t)uip_buf + UIP_LLH_LEN; + chksum_ptr = (uint16_t)uip_buf + UIP_LLH_LEN; chksum_len = UIP_IPH_LEN; return chksum(); } /*-----------------------------------------------------------------------------------*/ #pragma optimize(push, off) -static u16_t -transport_chksum(u8_t protocol) +static uint16_t +transport_chksum(uint8_t protocol) { chksum_protocol = protocol; - chksum_ptr = (u16_t)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]; + chksum_ptr = (uint16_t)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]; chksum_len = UIP_TCPH_LEN; chksum_tmp = chksum(); - chksum_ptr = (u16_t)uip_appdata; + chksum_ptr = (uint16_t)uip_appdata; asm("lda _uip_aligned_buf+3+%b", UIP_LLH_LEN); asm("sec"); asm("sbc #%b", UIP_IPTCPH_LEN); @@ -313,16 +313,16 @@ transport_chksum(u8_t protocol) #pragma optimize(pop) /*-----------------------------------------------------------------------------------*/ -u16_t +uint16_t uip_tcpchksum(void) { return transport_chksum(IP_PROTO_TCP); #if 0 - chksum_ptr = (u16_t)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]; + chksum_ptr = (uint16_t)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]; chksum_len = UIP_TCPH_LEN; chksum_tmp = chksum(); - chksum_ptr = (u16_t)uip_appdata; + chksum_ptr = (uint16_t)uip_appdata; asm("lda _uip_buf+3+%b", UIP_LLH_LEN); asm("sec"); asm("sbc #%b", UIP_IPTCPH_LEN); @@ -416,16 +416,16 @@ uip_tcpchksum(void) /*-----------------------------------------------------------------------------------*/ #if UIP_UDP_CHECKSUMS -u16_t +uint16_t uip_udpchksum(void) { return transport_chksum(IP_PROTO_UDP); #if 0 - chksum_ptr = (u16_t)&uip_buf[20 + UIP_LLH_LEN]; + chksum_ptr = (uint16_t)&uip_buf[20 + UIP_LLH_LEN]; chksum_len = 20; chksum_tmp = chksum(); - chksum_ptr = (u16_t)uip_appdata; + chksum_ptr = (uint16_t)uip_appdata; asm("lda _uip_buf+3+%b", UIP_LLH_LEN); asm("sec"); asm("sbc #40"); diff --git a/cpu/arm/at91sam7s/loader/codeprop-otf.c b/cpu/arm/at91sam7s/loader/codeprop-otf.c index 5a914ae74..f676d8d22 100644 --- a/cpu/arm/at91sam7s/loader/codeprop-otf.c +++ b/cpu/arm/at91sam7s/loader/codeprop-otf.c @@ -106,18 +106,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); @@ -125,19 +125,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; @@ -200,10 +200,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); diff --git a/cpu/arm/common/usb/cdc-eth/cdc-eth.c b/cpu/arm/common/usb/cdc-eth/cdc-eth.c index ac9e729a6..e46b978d0 100644 --- a/cpu/arm/common/usb/cdc-eth/cdc-eth.c +++ b/cpu/arm/common/usb/cdc-eth/cdc-eth.c @@ -46,7 +46,7 @@ init_recv_buffer() recv_buffer.flags = USB_BUFFER_SHORT_END | USB_BUFFER_NOTIFY; } -u8_t +uint8_t usbeth_send(void) { if ((xmit_buffer[0].flags & USB_BUFFER_SUBMITTED)) return UIP_FW_DROPPED; diff --git a/cpu/arm/common/usb/cdc-eth/dhcps.c b/cpu/arm/common/usb/cdc-eth/dhcps.c index fd295f831..3fb619d37 100644 --- a/cpu/arm/common/usb/cdc-eth/dhcps.c +++ b/cpu/arm/common/usb/cdc-eth/dhcps.c @@ -315,7 +315,7 @@ static uip_ipaddr_t bcast_addr; static void send_offer(struct uip_udp_conn *conn, struct dhcps_client_lease *lease) { - u8_t *end; + uint8_t *end; struct dhcp_msg *m = (struct dhcp_msg *)uip_appdata; create_msg(m); @@ -327,13 +327,13 @@ send_offer(struct uip_udp_conn *conn, struct dhcps_client_lease *lease) end = add_config(end); end = add_end(end); uip_ipaddr_copy(&conn->ripaddr, &bcast_addr); - uip_send(uip_appdata, (int)(end - (u8_t *)uip_appdata)); + uip_send(uip_appdata, (int)(end - (uint8_t *)uip_appdata)); } static void send_ack(struct uip_udp_conn *conn, struct dhcps_client_lease *lease) { - u8_t *end; + uint8_t *end; uip_ipaddr_t ciaddr; struct dhcp_msg *m = (struct dhcp_msg *)uip_appdata; @@ -347,13 +347,13 @@ send_ack(struct uip_udp_conn *conn, struct dhcps_client_lease *lease) end = add_end(end); memcpy(&ciaddr, &lease->ipaddr,4); uip_ipaddr_copy(&conn->ripaddr, &bcast_addr); - uip_send(uip_appdata, (int)(end - (u8_t *)uip_appdata)); + uip_send(uip_appdata, (int)(end - (uint8_t *)uip_appdata)); printf("ACK\n"); } static void send_nack(struct uip_udp_conn *conn) { - u8_t *end; + uint8_t *end; struct dhcp_msg *m = (struct dhcp_msg *)uip_appdata; create_msg(m); @@ -364,7 +364,7 @@ send_nack(struct uip_udp_conn *conn) end = add_end(end); uip_ipaddr_copy(&conn->ripaddr, &bcast_addr); - uip_send(uip_appdata, (int)(end - (u8_t *)uip_appdata)); + uip_send(uip_appdata, (int)(end - (uint8_t *)uip_appdata)); printf("NACK\n"); } diff --git a/cpu/avr/dev/lanc111.c b/cpu/avr/dev/lanc111.c index fd372706a..a19798605 100644 --- a/cpu/avr/dev/lanc111.c +++ b/cpu/avr/dev/lanc111.c @@ -476,17 +476,17 @@ #define MSBV(bit) (1 << ((bit) - 8)) -#define nic_outlb(addr, val) (*(volatile u8_t *)(addr) = (val)) -#define nic_outhb(addr, val) (*(volatile u8_t *)((addr) + 1) = (val)) -#define nic_outwx(addr, val) (*(volatile u16_t *)(addr) = (val)) +#define nic_outlb(addr, val) (*(volatile uint8_t *)(addr) = (val)) +#define nic_outhb(addr, val) (*(volatile uint8_t *)((addr) + 1) = (val)) +#define nic_outwx(addr, val) (*(volatile uint16_t *)(addr) = (val)) #define nic_outw(addr, val) { \ - *(volatile u8_t *)(addr) = (u8_t)(val); \ - *((volatile u8_t *)(addr) + 1) = (u8_t)((val) >> 8); \ + *(volatile uint8_t *)(addr) = (uint8_t)(val); \ + *((volatile uint8_t *)(addr) + 1) = (uint8_t)((val) >> 8); \ } -#define nic_inlb(addr) (*(volatile u8_t *)(addr)) -#define nic_inhb(addr) (*(volatile u8_t *)((addr) + 1)) -#define nic_inw(addr) (*(volatile u16_t *)(addr)) +#define nic_inlb(addr) (*(volatile uint8_t *)(addr)) +#define nic_inhb(addr) (*(volatile uint8_t *)((addr) + 1)) +#define nic_inw(addr) (*(volatile uint16_t *)(addr)) #define nic_bs(bank) nic_outlb(NIC_BSR, bank) @@ -513,11 +513,11 @@ * * \return Contents of the PHY interface rgister. */ -static u8_t NicPhyRegSelect(u8_t reg, u8_t we) +static uint8_t NicPhyRegSelect(uint8_t reg, uint8_t we) { - u8_t rs; - u8_t msk; - u8_t i; + uint8_t rs; + uint8_t msk; + uint8_t i; nic_bs(3); rs = (nic_inlb(NIC_MGMT) & ~(MGMT_MCLK | MGMT_MDO)) | MGMT_MDOE; @@ -577,11 +577,11 @@ static u8_t NicPhyRegSelect(u8_t reg, u8_t we) * * \return Contents of the specified register. */ -static u16_t NicPhyRead(u8_t reg) +static uint16_t NicPhyRead(uint8_t reg) { - u16_t rc = 0; - u8_t rs; - u8_t i; + uint16_t rc = 0; + uint8_t rs; + uint8_t i; /* Select register for reading. */ rs = NicPhyRegSelect(reg, 0); @@ -613,10 +613,10 @@ static u16_t NicPhyRead(u8_t reg) * \param reg PHY register number. * \param val Value to write. */ -static void NicPhyWrite(u8_t reg, u16_t val) +static void NicPhyWrite(uint8_t reg, uint16_t val) { - u16_t msk; - u8_t rs; + uint16_t msk; + uint8_t rs; /* Select register for writing. */ rs = NicPhyRegSelect(reg, 1); @@ -649,10 +649,10 @@ static void NicPhyWrite(u8_t reg, u16_t val) */ static int NicPhyConfig(void) { - u16_t phy_sor; - u16_t phy_sr; - u16_t phy_to; - u16_t mode; + uint16_t phy_sor; + uint16_t phy_sr; + uint16_t phy_to; + uint16_t mode; /* * Reset the PHY and wait until this self clearing bit @@ -739,7 +739,7 @@ static int NicPhyConfig(void) * * \return 0 on success or -1 on timeout. */ -static INLINE int NicMmuWait(u16_t tmo) +static INLINE int NicMmuWait(uint16_t tmo) { while (tmo--) { if ((nic_inlb(NIC_MMUCR) & MMUCR_BUSY) == 0) @@ -803,9 +803,9 @@ static int NicReset(void) * * \param mac Six byte unique MAC address. */ -static int NicStart(CONST u8_t * mac) +static int NicStart(CONST uint8_t * mac) { - u8_t i; + uint8_t i; if (NicReset()) return -1; @@ -843,8 +843,8 @@ static int NicStart(CONST u8_t * mac) #if 0 static void NicInterrupt(void *arg) { - u8_t isr; - u8_t imr; + uint8_t isr; + uint8_t imr; NICINFO *ni = (NICINFO *) ((NUTDEVICE *) arg)->dev_dcb; ni->ni_interrupts++; @@ -912,11 +912,11 @@ static void NicInterrupt(void *arg) /* * Write data block to the NIC. */ -static void NicWrite(u8_t * buf, u16_t len) +static void NicWrite(uint8_t * buf, uint16_t len) { - register u16_t l = len - 1; - register u8_t ih = (u16_t) l >> 8; - register u8_t il = (u8_t) l; + register uint16_t l = len - 1; + register uint8_t ih = (uint16_t) l >> 8; + register uint8_t il = (uint8_t) l; if (!len) return; @@ -931,11 +931,11 @@ static void NicWrite(u8_t * buf, u16_t len) /* * Read data block from the NIC. */ -static void NicRead(u8_t * buf, u16_t len) +static void NicRead(uint8_t * buf, uint16_t len) { - register u16_t l = len - 1; - register u8_t ih = (u16_t) l >> 8; - register u8_t il = (u8_t) l; + register uint16_t l = len - 1; + register uint8_t ih = (uint16_t) l >> 8; + register uint8_t il = (uint8_t) l; if (!len) return; @@ -960,9 +960,9 @@ static void NicRead(u8_t * buf, u16_t len) static NETBUF *NicGetPacket(void) { NETBUF *nb = 0; - //u8_t *buf; - u16_t fsw; - u16_t fbc; + //uint8_t *buf; + uint16_t fsw; + uint16_t fbc; /* Check the fifo empty bit. If it is set, then there is nothing in the receiver fifo. */ @@ -1028,9 +1028,9 @@ static NETBUF *NicGetPacket(void) #if 0 static int NicPutPacket(NETBUF * nb) { - u16_t sz; - u8_t odd = 0; - u8_t imsk; + uint16_t sz; + uint8_t odd = 0; + uint8_t imsk; //printf("[P]"); /* @@ -1130,7 +1130,7 @@ PROCESS_THREAD(lanc111_process, ev, data) IFNET *ifn; NICINFO *ni; NETBUF *nb;*/ - u8_t imsk; + uint8_t imsk; static struct etimer et; /* dev = arg; diff --git a/cpu/avr/dev/rtl8019-drv.c b/cpu/avr/dev/rtl8019-drv.c index a65a68dd5..fbcf81854 100644 --- a/cpu/avr/dev/rtl8019-drv.c +++ b/cpu/avr/dev/rtl8019-drv.c @@ -42,7 +42,7 @@ PROCESS(rtl8019_process, "RTL8019 driver"); /*---------------------------------------------------------------------------*/ -u8_t +uint8_t rtl8019_output(void) { uip_arp_out(); diff --git a/cpu/avr/dev/rtl8019-drv.h b/cpu/avr/dev/rtl8019-drv.h index 513891a07..f11a86e28 100644 --- a/cpu/avr/dev/rtl8019-drv.h +++ b/cpu/avr/dev/rtl8019-drv.h @@ -41,6 +41,6 @@ PROCESS_NAME(rtl8019_process); -u8_t rtl8019_output(void); +uint8_t rtl8019_output(void); #endif /* __RTL8019_DRV_H__ */ diff --git a/cpu/avr/slip_uart1.c b/cpu/avr/slip_uart1.c index 1c97f09c6..af9cc0685 100644 --- a/cpu/avr/slip_uart1.c +++ b/cpu/avr/slip_uart1.c @@ -73,7 +73,7 @@ FDEV_SETUP_STREAM(slip_putchar, NULL, _FDEV_SETUP_WRITE); void slip_arch_init(unsigned long ubr) { - u8_t dummy; + uint8_t dummy; spl_t s = splhigh(); UBRR1L = ubr; diff --git a/cpu/cc2430/mtarch.c b/cpu/cc2430/mtarch.c index 97614ad43..50f9959dc 100644 --- a/cpu/cc2430/mtarch.c +++ b/cpu/cc2430/mtarch.c @@ -47,7 +47,7 @@ void mtarch_start(struct mtarch_thread *t, void (*function)(void *), void *data) { - u16_t i; + uint16_t i; for(i = 0; i < MTARCH_STACKSIZE; i++) { t->stack[i] = i; @@ -57,15 +57,15 @@ mtarch_start(struct mtarch_thread *t, /* A parameter for method for thread function. */ - *t->sp = (u16_t)data; + *t->sp = (uint16_t)data; --t->sp; /* This will be a return address of thread function. */ - *t->sp = (u16_t)mt_exit; + *t->sp = (uint16_t)mt_exit; --t->sp; /* The thread function, is used as a return address of mtarch_switch. */ - *t->sp = (u16_t)function; + *t->sp = (uint16_t)function; --t->sp; /* @@ -82,7 +82,7 @@ mtarch_start(struct mtarch_thread *t, } /*--------------------------------------------------------------------------*/ static struct mtarch_thread *running_thread; -static u16_t *sptmp; +static uint16_t *sptmp; static void mtarch_switch() { @@ -180,7 +180,7 @@ mtarch_pstart() int mtarch_stack_usage(struct mtarch_thread *t) { - u16_t i; + uint16_t i; for (i = 0; i < MTARCH_STACKSIZE; i++) { if (t->stack[i] != i) { return MTARCH_STACKSIZE - i; diff --git a/cpu/cc2430/mtarch.h b/cpu/cc2430/mtarch.h index 9c458be98..f5d2b80b2 100644 --- a/cpu/cc2430/mtarch.h +++ b/cpu/cc2430/mtarch.h @@ -48,12 +48,12 @@ struct mtarch_thread { * On top of the mtarch_thread must be the address for the stack pointer. * See details at mtarch_switch in mtarch.c */ - u16_t *sp; + uint16_t *sp; /* * Stack is 2-byte wide, so please note that you need 2 * MTARCH_STACKSIZE * bytes for the stack area for each thread. */ - u16_t stack[MTARCH_STACKSIZE]; + uint16_t stack[MTARCH_STACKSIZE]; }; /* diff --git a/cpu/cc2430/uip_arch-asm.S b/cpu/cc2430/uip_arch-asm.S index 0f9decbc1..e64ddf45a 100644 --- a/cpu/cc2430/uip_arch-asm.S +++ b/cpu/cc2430/uip_arch-asm.S @@ -27,7 +27,7 @@ .area _CODE ;; --------------------------------- - ;; void uip_add32(u8_t *op32, u16_t op16); + ;; void uip_add32(uint8_t *op32, uint16_t op16); ;; Stack; retl reth op32l op32h op16l op16h ;; ABCDEHL____ ;; return void @@ -102,7 +102,7 @@ _uip_add32_nocarry0: _uip_add32_end:: ;; --------------------------------- - ;; static u16_t chksum(u16_t sum, const u8_t *data, u16_t len) + ;; static uint16_t chksum(uint16_t sum, const uint8_t *data, uint16_t len) ;; Stack; retl reth suml sumh datal datah lenl lenh ;; ABCDEHL____ ;; return HL @@ -188,11 +188,11 @@ _uip_arch_chksum_loop_exit: _uip_arch_chksum_end:: ;; --------------------------------- - ;; u16_t uip_chksum(void); + ;; uint16_t uip_chksum(void); ;; Stack; retl reth datal datah lenl lenh ;; ABCDEHL____ ;; return HL - ;; return htons(chksum(0, (u8_t *)data, len)); + ;; return htons(chksum(0, (uint8_t *)data, len)); ;; --------------------------------- _uip_chksum_start:: _uip_chksum: diff --git a/cpu/cc2430/uip_arch.c b/cpu/cc2430/uip_arch.c index c0010c69a..afa6b601e 100644 --- a/cpu/cc2430/uip_arch.c +++ b/cpu/cc2430/uip_arch.c @@ -41,15 +41,15 @@ #include #include "uip_arch.h" -static const u16_t sizeof_uip_ipaddr_t = sizeof(uip_ipaddr_t); -static const u16_t offset_tcpip_hdr_len = offsetof(struct uip_tcpip_hdr, len); -static const u16_t offset_tcpip_hdr_srcipaddr = offsetof(struct uip_tcpip_hdr, srcipaddr); +static const uint16_t sizeof_uip_ipaddr_t = sizeof(uip_ipaddr_t); +static const uint16_t offset_tcpip_hdr_len = offsetof(struct uip_tcpip_hdr, len); +static const uint16_t offset_tcpip_hdr_srcipaddr = offsetof(struct uip_tcpip_hdr, srcipaddr); /*--------------------------------------------------------------------------*/ static void upper_layer_chksum() { __asm ;; --------------------------------- - ;; static u16_t upper_layer_chksum(u8_t proto); + ;; static uint16_t upper_layer_chksum(uint8_t proto); ;; Stack; retl reth ;; @param C proto ;; ABCDEHL____ @@ -142,12 +142,12 @@ __endasm; } /*--------------------------------------------------------------------------*/ -u16_t +uint16_t uip_ipchksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_ipchksum(void); + ;; uint16_t uip_ipchksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL @@ -164,12 +164,12 @@ __endasm; /*--------------------------------------------------------------------------*/ #if UIP_CONF_IPV6 -u16_t +uint16_t uip_icmp6chksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_icmp6chksum(void); + ;; uint16_t uip_icmp6chksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL @@ -181,12 +181,12 @@ __endasm; #endif /* UIP_CONF_IPV6 */ /*--------------------------------------------------------------------------*/ -u16_t +uint16_t uip_tcpchksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_tcpchksum(void); + ;; uint16_t uip_tcpchksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL @@ -198,12 +198,12 @@ __endasm; /*--------------------------------------------------------------------------*/ #if UIP_UDP_CHKSUMS -u16_t +uint16_t uip_udpchksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_udpchksum(void); + ;; uint16_t uip_udpchksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL diff --git a/cpu/mc1322x/contiki-mc1322x-conf.h b/cpu/mc1322x/contiki-mc1322x-conf.h index c5acbb1d6..e7fce0aaa 100644 --- a/cpu/mc1322x/contiki-mc1322x-conf.h +++ b/cpu/mc1322x/contiki-mc1322x-conf.h @@ -47,12 +47,14 @@ typedef int32_t s32_t; /* Pre-allocated memory for loadable modules heap space (in bytes)*/ #define MMEM_CONF_SIZE 256 -typedef uint32_t clock_time_t; +/* These names are deprecated, use C99 names. */ typedef unsigned char u8_t; typedef unsigned short u16_t; typedef unsigned long u32_t; typedef unsigned short uip_stats_t; +typedef uint32_t clock_time_t; + void clock_delay(unsigned int us2); void clock_wait(int ms10); void clock_set_seconds(unsigned long s); diff --git a/cpu/msp430/dev/button.h b/cpu/msp430/dev/button.h index 840d0176c..4542fcacc 100644 --- a/cpu/msp430/dev/button.h +++ b/cpu/msp430/dev/button.h @@ -35,8 +35,8 @@ #define BUTTON_MSG_TYPE 1 struct button_msg { - u8_t type; - u8_t value; + uint8_t type; + uint8_t value; }; void button_init(struct process *proc); diff --git a/cpu/msp430/uip-ipchksum.c b/cpu/msp430/uip-ipchksum.c index 5ed3736f3..c32359f6d 100644 --- a/cpu/msp430/uip-ipchksum.c +++ b/cpu/msp430/uip-ipchksum.c @@ -42,18 +42,18 @@ /*---------------------------------------------------------------------------*/ #ifdef UIP_ARCH_IPCHKSUM #ifdef __IAR_SYSTEMS_ICC__ -u16_t +uint16_t uip_ipchksum(void) { return 0; } #else -u16_t +uint16_t uip_ipchksum(void) { /* Assumes proper alignement of uip_buf. */ - u16_t *p = (u16_t *)&uip_buf[UIP_LLH_LEN]; - register u16_t sum; + uint16_t *p = (uint16_t *)&uip_buf[UIP_LLH_LEN]; + register uint16_t sum; sum = p[0]; asmv("add %[p], %[sum]": [sum] "+r" (sum): [p] "m" (p[1])); diff --git a/cpu/native/net/tapdev-drv.c b/cpu/native/net/tapdev-drv.c index 44fe64d28..89dd9630b 100644 --- a/cpu/native/net/tapdev-drv.c +++ b/cpu/native/net/tapdev-drv.c @@ -48,7 +48,7 @@ PROCESS(tapdev_process, "TAP driver"); /*---------------------------------------------------------------------------*/ #if !UIP_CONF_IPV6 -u8_t +uint8_t tapdev_output(void) { uip_arp_out(); diff --git a/cpu/native/net/tapdev-drv.h b/cpu/native/net/tapdev-drv.h index f5b3b3720..c5def8bf0 100644 --- a/cpu/native/net/tapdev-drv.h +++ b/cpu/native/net/tapdev-drv.h @@ -38,6 +38,6 @@ PROCESS_NAME(tapdev_process); -u8_t tapdev_output(void); +uint8_t tapdev_output(void); #endif /* __TAPDEV_DRV_H__ */ diff --git a/cpu/native/net/tapdev.c b/cpu/native/net/tapdev.c index 1996e17a3..f00785d12 100644 --- a/cpu/native/net/tapdev.c +++ b/cpu/native/net/tapdev.c @@ -122,7 +122,7 @@ tapdev_init(void) lasttime = 0; } /*---------------------------------------------------------------------------*/ -u16_t +uint16_t tapdev_poll(void) { fd_set fdset; diff --git a/cpu/native/net/tapdev.h b/cpu/native/net/tapdev.h index d3c1d53c8..0c9005fb6 100644 --- a/cpu/native/net/tapdev.h +++ b/cpu/native/net/tapdev.h @@ -38,7 +38,7 @@ #define __TAPDEV_H__ void tapdev_init(void); -u16_t tapdev_poll(void); +uint16_t tapdev_poll(void); void tapdev_send(void); void tapdev_exit(void); diff --git a/cpu/native/net/tapdev6.c b/cpu/native/net/tapdev6.c index 6334bbe9a..b63f1ac46 100644 --- a/cpu/native/net/tapdev6.c +++ b/cpu/native/net/tapdev6.c @@ -77,17 +77,17 @@ static unsigned long lasttime; #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]) #else #define PRINTF(...) #define PRINT6ADDR(addr) #endif static void do_send(void); -u8_t tapdev_send(uip_lladdr_t *lladdr); +uint8_t tapdev_send(uip_lladdr_t *lladdr); -u16_t +uint16_t tapdev_poll(void) { fd_set fdset; @@ -192,7 +192,7 @@ do_send(void) } } /*---------------------------------------------------------------------------*/ -u8_t tapdev_send(uip_lladdr_t *lladdr) +uint8_t tapdev_send(uip_lladdr_t *lladdr) { /* * If L3 dest is multicast, build L2 multicast address diff --git a/cpu/native/net/tapdev6.h b/cpu/native/net/tapdev6.h index 2b93cbe06..8e025caa0 100644 --- a/cpu/native/net/tapdev6.h +++ b/cpu/native/net/tapdev6.h @@ -40,8 +40,8 @@ #include "contiki-net.h" void tapdev_init(void); -u8_t tapdev_send(uip_lladdr_t *lladdr); -u16_t tapdev_poll(void); +uint8_t tapdev_send(uip_lladdr_t *lladdr); +uint16_t tapdev_poll(void); void tapdev_do_send(void); void tapdev_exit(void); //math #endif /* __TAPDEV_H__ */ diff --git a/cpu/native/net/wpcap-drv.c b/cpu/native/net/wpcap-drv.c index bbba1bdf4..d9a1fd0e1 100644 --- a/cpu/native/net/wpcap-drv.c +++ b/cpu/native/net/wpcap-drv.c @@ -65,7 +65,7 @@ PROCESS(wpcap_process, "WinPcap driver"); /*---------------------------------------------------------------------------*/ #if !UIP_CONF_IPV6 -u8_t +uint8_t wpcap_output(void) { uip_arp_out(); diff --git a/cpu/native/net/wpcap-drv.h b/cpu/native/net/wpcap-drv.h index 5d0465369..d3f78e969 100644 --- a/cpu/native/net/wpcap-drv.h +++ b/cpu/native/net/wpcap-drv.h @@ -38,6 +38,6 @@ PROCESS_NAME(wpcap_process); -u8_t wpcap_output(void); +uint8_t wpcap_output(void); #endif /* __WPCAP_DRV_H__ */ diff --git a/cpu/native/net/wpcap.c b/cpu/native/net/wpcap.c index 6daf737ec..ce44c7dc8 100644 --- a/cpu/native/net/wpcap.c +++ b/cpu/native/net/wpcap.c @@ -185,7 +185,7 @@ init(void) /* Nothing to do here */ } /*---------------------------------------------------------------------------*/ -u8_t wfall_send(uip_lladdr_t *lladdr); +uint8_t wfall_send(uip_lladdr_t *lladdr); #if FALLBACK_HAS_ETHERNET_HEADERS #undef IPBUF #define IPBUF ((struct uip_tcpip_hdr *)&uip_buf[14]) @@ -597,7 +597,7 @@ wpcap_init(void) } /*---------------------------------------------------------------------------*/ -u16_t +uint16_t wpcap_poll(void) { struct pcap_pkthdr *packet_header; @@ -656,12 +656,12 @@ wpcap_poll(void) } // PRINTF("SIN: %lu\n", packet_header->caplen); CopyMemory(uip_buf, packet, packet_header->caplen); - return (u16_t)packet_header->caplen; + return (uint16_t)packet_header->caplen; } #ifdef UIP_FALLBACK_INTERFACE -u16_t +uint16_t wfall_poll(void) { struct pcap_pkthdr *packet_header; @@ -699,7 +699,7 @@ wfall_poll(void) } PRINTF("FIN: %lu\n", packet_header->caplen); CopyMemory(uip_buf, packet, packet_header->caplen); - return (u16_t)packet_header->caplen; + return (uint16_t)packet_header->caplen; } @@ -707,7 +707,7 @@ wfall_poll(void) /*---------------------------------------------------------------------------*/ #if UIP_CONF_IPV6 -u8_t +uint8_t wpcap_send(uip_lladdr_t *lladdr) { if(lladdr == NULL) { @@ -744,7 +744,7 @@ wpcap_send(uip_lladdr_t *lladdr) return 0; } #ifdef UIP_FALLBACK_INTERFACE -u8_t +uint8_t wfall_send(uip_lladdr_t *lladdr) { #if FALLBACK_HAS_ETHERNET_HEADERS diff --git a/cpu/native/net/wpcap.h b/cpu/native/net/wpcap.h index 2f4a0cc52..31ca0d763 100644 --- a/cpu/native/net/wpcap.h +++ b/cpu/native/net/wpcap.h @@ -37,11 +37,11 @@ #define __WPCAP_H__ void wpcap_init(void); -u16_t wpcap_poll(void); -u16_t wfall_poll(void); +uint16_t wpcap_poll(void); +uint16_t wfall_poll(void); #if UIP_CONF_IPV6 -u8_t wpcap_send(uip_lladdr_t *lladdr); -u8_t wfall_send(uip_lladdr_t *lladdr); +uint8_t wpcap_send(uip_lladdr_t *lladdr); +uint8_t wfall_send(uip_lladdr_t *lladdr); #else void wpcap_send(void); #endif diff --git a/cpu/stm32w108/cfs-coffee-arch.c b/cpu/stm32w108/cfs-coffee-arch.c index 789885c28..99b8e967b 100644 --- a/cpu/stm32w108/cfs-coffee-arch.c +++ b/cpu/stm32w108/cfs-coffee-arch.c @@ -525,7 +525,7 @@ void stm32w_flash_write(int32u address, const void * data, int32u length) halInternalFlashWrite(curr_page, (int16u *)buf, FLASH_PAGE_SIZE/2); ENERGEST_OFF(ENERGEST_TYPE_FLASH_WRITE); - data = (u8_t *)data + next_page - i; + data = (uint8_t *)data + next_page - i; i = next_page; } diff --git a/cpu/stm32w108/dev/stm32w-radio.c b/cpu/stm32w108/dev/stm32w-radio.c index fcbae0480..77f9d9b9d 100644 --- a/cpu/stm32w108/dev/stm32w-radio.c +++ b/cpu/stm32w108/dev/stm32w-radio.c @@ -227,7 +227,7 @@ static int stm32w_radio_init(void) return 0; } /*---------------------------------------------------------------------------*/ -int stm32w_radio_set_channel(u8_t channel) +int stm32w_radio_set_channel(uint8_t channel) { if (ST_RadioSetChannel(channel) == ST_SUCCESS) return 0; @@ -300,7 +300,7 @@ static int stm32w_radio_transmit(unsigned short payload_len) PRINTF("stm32w: sending %d bytes\r\n", payload_len); #if DEBUG > 1 - for(u8_t c=1; c <= stm32w_txbuf[0]-2; c++){ + for(uint8_t c=1; c <= stm32w_txbuf[0]-2; c++){ PRINTF("%x:",stm32w_txbuf[c]); } PRINTF("\r\n"); @@ -503,7 +503,7 @@ PROCESS_THREAD(stm32w_radio_process, ev, data) PRINTF("stm32w_radio_process: calling receiver callback\r\n"); #if DEBUG > 1 - for(u8_t c=1; c <= RCVD_PACKET_LEN; c++){ + for(uint8_t c=1; c <= RCVD_PACKET_LEN; c++){ PRINTF("%x",stm32w_rxbuf[c]); } PRINTF("\r\n"); diff --git a/cpu/stm32w108/dev/stm32w-radio.h b/cpu/stm32w108/dev/stm32w-radio.h index a2bdc3e54..dfb0a49cf 100644 --- a/cpu/stm32w108/dev/stm32w-radio.h +++ b/cpu/stm32w108/dev/stm32w-radio.h @@ -46,7 +46,7 @@ #include "hal/hal.h" #include "simplemac/include/phy-library.h" -int stm32w_radio_set_channel(u8_t channel); +int stm32w_radio_set_channel(uint8_t channel); short last_packet_rssi(); #define STM32W_MAX_PACKET_LEN 127 diff --git a/cpu/stm32w108/dev/uart1.c b/cpu/stm32w108/dev/uart1.c index 3a0db2742..b1dd0bf92 100644 --- a/cpu/stm32w108/dev/uart1.c +++ b/cpu/stm32w108/dev/uart1.c @@ -138,8 +138,8 @@ uart1_init(unsigned long ubr) GPIO_PBCFGL &= 0xF00F; GPIO_PBCFGL |= 0x0490; - u16_t uartper = (u32_t)24e6/(2*ubr); - u32_t rest = (u32_t)24e6%(2*ubr); + uint16_t uartper = (uint32_t)24e6/(2*ubr); + uint32_t rest = (uint32_t)24e6%(2*ubr); SC1_UARTFRAC = 0; diff --git a/cpu/stm32w108/rand.c b/cpu/stm32w108/rand.c index 2743b8617..ef1f3b8f1 100644 --- a/cpu/stm32w108/rand.c +++ b/cpu/stm32w108/rand.c @@ -49,7 +49,7 @@ int rand(void) { - u16_t rand_num; + uint16_t rand_num; ST_RadioGetRandomNumbers(&rand_num, 1); diff --git a/cpu/stm32w108/rtimer-arch.c b/cpu/stm32w108/rtimer-arch.c index 2c3b08f89..3c341e3ac 100644 --- a/cpu/stm32w108/rtimer-arch.c +++ b/cpu/stm32w108/rtimer-arch.c @@ -55,12 +55,12 @@ -static u32_t time_msb = 0; // Most significant bits of the current time. +static uint32_t time_msb = 0; // Most significant bits of the current time. // time of the next rtimer event. Initially is set to the max value. static rtimer_clock_t next_rtimer_time = 0; -static u16_t saved_TIM1CFG; +static uint16_t saved_TIM1CFG; /*---------------------------------------------------------------------------*/ @@ -150,7 +150,7 @@ void rtimer_arch_schedule(rtimer_clock_t t) { - PRINTF("rtimer_arch_schedule time %4x\r\n", /*((u32_t*)&t)+1,*/(u32_t)t); + PRINTF("rtimer_arch_schedule time %4x\r\n", /*((uint32_t*)&t)+1,*/(uint32_t)t); next_rtimer_time = t; diff --git a/cpu/stm32w108/uip_arch.c b/cpu/stm32w108/uip_arch.c index d02c7881a..55fa3d528 100644 --- a/cpu/stm32w108/uip_arch.c +++ b/cpu/stm32w108/uip_arch.c @@ -49,7 +49,7 @@ /*-----------------------------------------------------------------------------------*/ #if UIP_TCP void -uip_add32(u8_t *op32, u16_t op16) +uip_add32(uint8_t *op32, uint16_t op16) { uint32_t op32_align, uip_acc32_align; diff --git a/cpu/z80/lib/libconio_z80.c b/cpu/z80/lib/libconio_z80.c index 66209e395..e35f9d075 100644 --- a/cpu/z80/lib/libconio_z80.c +++ b/cpu/z80/lib/libconio_z80.c @@ -47,7 +47,7 @@ /*---------------------------------------------------------------------------*/ static void scroll() { unsigned char y; - u16_t src, dst; + uint16_t src, dst; for (y = 0; y < LIBCONIO_CONF_SCREEN_HEIGHT - 1; y++) { dst = LIBCONIO_VRAM_OFFSET(0, y); src = LIBCONIO_VRAM_OFFSET(0, y + 1); @@ -85,7 +85,7 @@ void ctk_arch_draw_char(char c, unsigned char ypos, unsigned char reversed, unsigned char color) { - u16_t off; + uint16_t off; adjust(&xpos, &ypos); off = LIBCONIO_VRAM_OFFSET(xpos, ypos); diff --git a/cpu/z80/loader/mef.c b/cpu/z80/loader/mef.c index 1b8567579..3b7a7403c 100644 --- a/cpu/z80/loader/mef.c +++ b/cpu/z80/loader/mef.c @@ -50,9 +50,9 @@ mef_load(unsigned char* offset) { unsigned char* start = offset; unsigned char areasize = load_byte(); - u16_t relocsize; + uint16_t relocsize; unsigned int i, j; - u16_t checksum = 0; + uint16_t checksum = 0; unsigned char* buf; struct Relocation reloc; @@ -94,12 +94,12 @@ mef_reloc(unsigned char* offset, struct Relocation *reloc) } offset += reloc->address; if (reloc->mode & MEF_RELOC_MSB_BYTE) { - *offset = (unsigned char) ((reloc->data + (u16_t) offset) >> 8); + *offset = (unsigned char) ((reloc->data + (uint16_t) offset) >> 8); } else if (reloc->mode & MEF_RELOC_LSB_BYTE) { - *offset = (unsigned char) ((reloc->data + (u16_t) offset) & 0xff); + *offset = (unsigned char) ((reloc->data + (uint16_t) offset) & 0xff); } else { /* word */ - *offset++ = (unsigned char) ((reloc->data + (u16_t) offset) & 0xff); - *offset = (unsigned char) ((reloc->data + (u16_t) offset) >> 8); + *offset++ = (unsigned char) ((reloc->data + (uint16_t) offset) & 0xff); + *offset = (unsigned char) ((reloc->data + (uint16_t) offset) >> 8); } } diff --git a/cpu/z80/loader/mef.h b/cpu/z80/loader/mef.h index 34ce8dcec..f00c86c5f 100644 --- a/cpu/z80/loader/mef.h +++ b/cpu/z80/loader/mef.h @@ -66,8 +66,8 @@ struct Area { unsigned char mode; - u16_t size; - u16_t checksum; + uint16_t size; + uint16_t checksum; }; /* @@ -82,8 +82,8 @@ struct Area { struct Relocation { unsigned char mode; - u16_t address; - u16_t data; + uint16_t address; + uint16_t data; }; unsigned char load_byte(); diff --git a/cpu/z80/mtarch.c b/cpu/z80/mtarch.c index 97614ad43..50f9959dc 100644 --- a/cpu/z80/mtarch.c +++ b/cpu/z80/mtarch.c @@ -47,7 +47,7 @@ void mtarch_start(struct mtarch_thread *t, void (*function)(void *), void *data) { - u16_t i; + uint16_t i; for(i = 0; i < MTARCH_STACKSIZE; i++) { t->stack[i] = i; @@ -57,15 +57,15 @@ mtarch_start(struct mtarch_thread *t, /* A parameter for method for thread function. */ - *t->sp = (u16_t)data; + *t->sp = (uint16_t)data; --t->sp; /* This will be a return address of thread function. */ - *t->sp = (u16_t)mt_exit; + *t->sp = (uint16_t)mt_exit; --t->sp; /* The thread function, is used as a return address of mtarch_switch. */ - *t->sp = (u16_t)function; + *t->sp = (uint16_t)function; --t->sp; /* @@ -82,7 +82,7 @@ mtarch_start(struct mtarch_thread *t, } /*--------------------------------------------------------------------------*/ static struct mtarch_thread *running_thread; -static u16_t *sptmp; +static uint16_t *sptmp; static void mtarch_switch() { @@ -180,7 +180,7 @@ mtarch_pstart() int mtarch_stack_usage(struct mtarch_thread *t) { - u16_t i; + uint16_t i; for (i = 0; i < MTARCH_STACKSIZE; i++) { if (t->stack[i] != i) { return MTARCH_STACKSIZE - i; diff --git a/cpu/z80/mtarch.h b/cpu/z80/mtarch.h index 9c458be98..f5d2b80b2 100644 --- a/cpu/z80/mtarch.h +++ b/cpu/z80/mtarch.h @@ -48,12 +48,12 @@ struct mtarch_thread { * On top of the mtarch_thread must be the address for the stack pointer. * See details at mtarch_switch in mtarch.c */ - u16_t *sp; + uint16_t *sp; /* * Stack is 2-byte wide, so please note that you need 2 * MTARCH_STACKSIZE * bytes for the stack area for each thread. */ - u16_t stack[MTARCH_STACKSIZE]; + uint16_t stack[MTARCH_STACKSIZE]; }; /* diff --git a/cpu/z80/uip_arch-asm.S b/cpu/z80/uip_arch-asm.S index 0f9decbc1..e64ddf45a 100644 --- a/cpu/z80/uip_arch-asm.S +++ b/cpu/z80/uip_arch-asm.S @@ -27,7 +27,7 @@ .area _CODE ;; --------------------------------- - ;; void uip_add32(u8_t *op32, u16_t op16); + ;; void uip_add32(uint8_t *op32, uint16_t op16); ;; Stack; retl reth op32l op32h op16l op16h ;; ABCDEHL____ ;; return void @@ -102,7 +102,7 @@ _uip_add32_nocarry0: _uip_add32_end:: ;; --------------------------------- - ;; static u16_t chksum(u16_t sum, const u8_t *data, u16_t len) + ;; static uint16_t chksum(uint16_t sum, const uint8_t *data, uint16_t len) ;; Stack; retl reth suml sumh datal datah lenl lenh ;; ABCDEHL____ ;; return HL @@ -188,11 +188,11 @@ _uip_arch_chksum_loop_exit: _uip_arch_chksum_end:: ;; --------------------------------- - ;; u16_t uip_chksum(void); + ;; uint16_t uip_chksum(void); ;; Stack; retl reth datal datah lenl lenh ;; ABCDEHL____ ;; return HL - ;; return htons(chksum(0, (u8_t *)data, len)); + ;; return htons(chksum(0, (uint8_t *)data, len)); ;; --------------------------------- _uip_chksum_start:: _uip_chksum: diff --git a/cpu/z80/uip_arch.c b/cpu/z80/uip_arch.c index fde5b9a14..739d57cc4 100644 --- a/cpu/z80/uip_arch.c +++ b/cpu/z80/uip_arch.c @@ -41,15 +41,15 @@ #include #include "uip_arch.h" -static const u16_t sizeof_uip_ipaddr_t = sizeof(uip_ipaddr_t); -static const u16_t offset_tcpip_hdr_len = offsetof(struct uip_tcpip_hdr, len); -static const u16_t offset_tcpip_hdr_srcipaddr = offsetof(struct uip_tcpip_hdr, srcipaddr); +static const uint16_t sizeof_uip_ipaddr_t = sizeof(uip_ipaddr_t); +static const uint16_t offset_tcpip_hdr_len = offsetof(struct uip_tcpip_hdr, len); +static const uint16_t offset_tcpip_hdr_srcipaddr = offsetof(struct uip_tcpip_hdr, srcipaddr); /*--------------------------------------------------------------------------*/ static void upper_layer_chksum() { __asm ;; --------------------------------- - ;; static u16_t upper_layer_chksum(u8_t proto); + ;; static uint16_t upper_layer_chksum(uint8_t proto); ;; Stack; retl reth ;; @param C proto ;; ABCDEHL____ @@ -142,12 +142,12 @@ __endasm; } /*--------------------------------------------------------------------------*/ -u16_t +uint16_t uip_ipchksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_ipchksum(void); + ;; uint16_t uip_ipchksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL @@ -164,12 +164,12 @@ __endasm; /*--------------------------------------------------------------------------*/ #if UIP_CONF_IPV6 -u16_t +uint16_t uip_icmp6chksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_icmp6chksum(void); + ;; uint16_t uip_icmp6chksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL @@ -181,12 +181,12 @@ __endasm; #endif /* UIP_CONF_IPV6 */ /*--------------------------------------------------------------------------*/ -u16_t +uint16_t uip_tcpchksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_tcpchksum(void); + ;; uint16_t uip_tcpchksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL @@ -198,12 +198,12 @@ __endasm; /*--------------------------------------------------------------------------*/ #if UIP_UDP_CHKSUMS -u16_t +uint16_t uip_udpchksum(void) { __asm ;; --------------------------------- - ;; u16_t uip_udpchksum(void); + ;; uint16_t uip_udpchksum(void); ;; Stack; retl reth ;; ABCDEHL____ ;; return HL