Changed all occurences of u8_t and u16_t to uint8_t and uint16_t

This commit is contained in:
adamdunkels 2008-02-24 22:10:30 +00:00
parent d99ca27820
commit 974870359a
4 changed files with 20 additions and 20 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: ctdma_mac.c,v 1.1 2007/09/18 10:36:36 fros4943 Exp $
* $Id: ctdma_mac.c,v 1.2 2008/02/24 22:10:30 adamdunkels Exp $
*/
#include "contiki.h"
@ -68,14 +68,14 @@
/* Buffers */
#define NUM_PACKETS 8
u8_t lastqueued = 0;
u8_t nextsend = 0;
u8_t freeslot = 0;
uint8_t lastqueued = 0;
uint8_t nextsend = 0;
uint8_t freeslot = 0;
struct queuebuf* data[NUM_PACKETS];
int id[NUM_PACKETS];
static struct ctimer ctimer;
u8_t timer_on = 0;
uint8_t timer_on = 0;
static const struct radio_driver *radio;
static void (* receiver_callback)(const struct mac_driver *);

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: cxmac.c,v 1.1 2007/09/18 10:35:39 fros4943 Exp $
* $Id: cxmac.c,v 1.2 2008/02/24 22:10:30 adamdunkels Exp $
*/
/**
@ -290,7 +290,7 @@ send(void)
msg.sender.u8[0],msg.sender.u8[1],
msg.receiver.u8[0],msg.receiver.u8[1],
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1]);*/
radio->send((const u8_t *)&msg, sizeof(struct xmac_hdr));
radio->send((const uint8_t *)&msg, sizeof(struct xmac_hdr));
/* while(RTIMER_CLOCK_LT(RTIMER_NOW(), t + STROBE_WAIT_TIME)) {*/
while(clock_time() < t + STROBE_WAIT_TIME) {
@ -298,7 +298,7 @@ send(void)
RTIMER_NOW(), t, STROBE_WAIT_TIME);*/
/* See if we got an ACK */
/* printf("befor read\n");*/
len = radio->read((u8_t *)&msg, sizeof(struct xmac_hdr));
len = radio->read((uint8_t *)&msg, sizeof(struct xmac_hdr));
/* printf("after read len %d\n", len);*/
if(len > 0) {
PRINTF("xmac len %d sender %d.%d receiver %d.%d node %d.%d.\n", len,
@ -403,7 +403,7 @@ static int
read(void)
{
struct xmac_hdr *hdr;
u8_t len;
uint8_t len;
rimebuf_clear();
@ -440,7 +440,7 @@ read(void)
PRINTF("xmac: sending sender %d.%d receiver %d.%d\n",
msg.sender.u8[0],msg.sender.u8[1],
msg.receiver.u8[0],msg.receiver.u8[1]);
radio->send((const u8_t *)&msg, sizeof(struct xmac_hdr));
radio->send((const uint8_t *)&msg, sizeof(struct xmac_hdr));
}
}
} else if(rimeaddr_cmp(&hdr->receiver, &rimeaddr_null)) {

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: tdma_mac.c,v 1.3 2007/11/26 15:31:32 adamdunkels Exp $
* $Id: tdma_mac.c,v 1.4 2008/02/24 22:10:30 adamdunkels Exp $
*/
#include "contiki.h"
@ -68,14 +68,14 @@
/* Buffers */
#define NUM_PACKETS 8
u8_t lastqueued = 0;
u8_t nextsend = 0;
u8_t freeslot = 0;
uint8_t lastqueued = 0;
uint8_t nextsend = 0;
uint8_t freeslot = 0;
struct queuebuf* data[NUM_PACKETS];
int id[NUM_PACKETS];
static struct rtimer rtimer;
u8_t timer_on = 0;
uint8_t timer_on = 0;
static const struct radio_driver *radio;
static void (* receiver_callback)(const struct mac_driver *);

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: xmac.c,v 1.16 2008/02/24 21:07:28 adamdunkels Exp $
* $Id: xmac.c,v 1.17 2008/02/24 22:10:30 adamdunkels Exp $
*/
/**
@ -350,13 +350,13 @@ send_packet(void)
}
#endif
/* Send the strobe packet. */
radio->send((const u8_t *)&msg, sizeof(struct xmac_hdr));
radio->send((const uint8_t *)&msg, sizeof(struct xmac_hdr));
CPRINTF("+");
while(got_ack == 0 &&
RTIMER_CLOCK_LT(RTIMER_NOW(), t + xmac_config.strobe_wait_time)) {
/* See if we got an ACK */
len = radio->read((u8_t *)&msg, sizeof(struct xmac_hdr));
len = radio->read((uint8_t *)&msg, sizeof(struct xmac_hdr));
if(len > 0) {
CPRINTF("_");
if(rimeaddr_cmp(&msg.sender, &rimeaddr_node_addr) &&
@ -463,7 +463,7 @@ static int
read_packet(void)
{
struct xmac_hdr *hdr;
u8_t len;
uint8_t len;
rimebuf_clear();
@ -506,7 +506,7 @@ read_packet(void)
someone_is_sending = 1;
waiting_for_packet = 1;
on();
radio->send((const u8_t *)&msg, sizeof(struct xmac_hdr));
radio->send((const uint8_t *)&msg, sizeof(struct xmac_hdr));
}
} else if(rimeaddr_cmp(&hdr->receiver, &rimeaddr_null)) {
/* If the receiver address is null, the strobe is sent to