Changed all occurences of u8_t and u16_t to uint8_t and uint16_t
This commit is contained in:
parent
d99ca27820
commit
974870359a
4 changed files with 20 additions and 20 deletions
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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"
|
#include "contiki.h"
|
||||||
|
@ -68,14 +68,14 @@
|
||||||
|
|
||||||
/* Buffers */
|
/* Buffers */
|
||||||
#define NUM_PACKETS 8
|
#define NUM_PACKETS 8
|
||||||
u8_t lastqueued = 0;
|
uint8_t lastqueued = 0;
|
||||||
u8_t nextsend = 0;
|
uint8_t nextsend = 0;
|
||||||
u8_t freeslot = 0;
|
uint8_t freeslot = 0;
|
||||||
struct queuebuf* data[NUM_PACKETS];
|
struct queuebuf* data[NUM_PACKETS];
|
||||||
int id[NUM_PACKETS];
|
int id[NUM_PACKETS];
|
||||||
|
|
||||||
static struct ctimer ctimer;
|
static struct ctimer ctimer;
|
||||||
u8_t timer_on = 0;
|
uint8_t timer_on = 0;
|
||||||
|
|
||||||
static const struct radio_driver *radio;
|
static const struct radio_driver *radio;
|
||||||
static void (* receiver_callback)(const struct mac_driver *);
|
static void (* receiver_callback)(const struct mac_driver *);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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.sender.u8[0],msg.sender.u8[1],
|
||||||
msg.receiver.u8[0],msg.receiver.u8[1],
|
msg.receiver.u8[0],msg.receiver.u8[1],
|
||||||
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.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(RTIMER_CLOCK_LT(RTIMER_NOW(), t + STROBE_WAIT_TIME)) {*/
|
||||||
while(clock_time() < t + STROBE_WAIT_TIME) {
|
while(clock_time() < t + STROBE_WAIT_TIME) {
|
||||||
|
@ -298,7 +298,7 @@ send(void)
|
||||||
RTIMER_NOW(), t, STROBE_WAIT_TIME);*/
|
RTIMER_NOW(), t, STROBE_WAIT_TIME);*/
|
||||||
/* See if we got an ACK */
|
/* See if we got an ACK */
|
||||||
/* printf("befor read\n");*/
|
/* 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);*/
|
/* printf("after read len %d\n", len);*/
|
||||||
if(len > 0) {
|
if(len > 0) {
|
||||||
PRINTF("xmac len %d sender %d.%d receiver %d.%d node %d.%d.\n", len,
|
PRINTF("xmac len %d sender %d.%d receiver %d.%d node %d.%d.\n", len,
|
||||||
|
@ -403,7 +403,7 @@ static int
|
||||||
read(void)
|
read(void)
|
||||||
{
|
{
|
||||||
struct xmac_hdr *hdr;
|
struct xmac_hdr *hdr;
|
||||||
u8_t len;
|
uint8_t len;
|
||||||
|
|
||||||
rimebuf_clear();
|
rimebuf_clear();
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ read(void)
|
||||||
PRINTF("xmac: sending sender %d.%d receiver %d.%d\n",
|
PRINTF("xmac: sending sender %d.%d receiver %d.%d\n",
|
||||||
msg.sender.u8[0],msg.sender.u8[1],
|
msg.sender.u8[0],msg.sender.u8[1],
|
||||||
msg.receiver.u8[0],msg.receiver.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)) {
|
} else if(rimeaddr_cmp(&hdr->receiver, &rimeaddr_null)) {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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"
|
#include "contiki.h"
|
||||||
|
@ -68,14 +68,14 @@
|
||||||
|
|
||||||
/* Buffers */
|
/* Buffers */
|
||||||
#define NUM_PACKETS 8
|
#define NUM_PACKETS 8
|
||||||
u8_t lastqueued = 0;
|
uint8_t lastqueued = 0;
|
||||||
u8_t nextsend = 0;
|
uint8_t nextsend = 0;
|
||||||
u8_t freeslot = 0;
|
uint8_t freeslot = 0;
|
||||||
struct queuebuf* data[NUM_PACKETS];
|
struct queuebuf* data[NUM_PACKETS];
|
||||||
int id[NUM_PACKETS];
|
int id[NUM_PACKETS];
|
||||||
|
|
||||||
static struct rtimer rtimer;
|
static struct rtimer rtimer;
|
||||||
u8_t timer_on = 0;
|
uint8_t timer_on = 0;
|
||||||
|
|
||||||
static const struct radio_driver *radio;
|
static const struct radio_driver *radio;
|
||||||
static void (* receiver_callback)(const struct mac_driver *);
|
static void (* receiver_callback)(const struct mac_driver *);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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
|
#endif
|
||||||
/* Send the strobe packet. */
|
/* 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("+");
|
CPRINTF("+");
|
||||||
|
|
||||||
while(got_ack == 0 &&
|
while(got_ack == 0 &&
|
||||||
RTIMER_CLOCK_LT(RTIMER_NOW(), t + xmac_config.strobe_wait_time)) {
|
RTIMER_CLOCK_LT(RTIMER_NOW(), t + xmac_config.strobe_wait_time)) {
|
||||||
/* See if we got an ACK */
|
/* 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) {
|
if(len > 0) {
|
||||||
CPRINTF("_");
|
CPRINTF("_");
|
||||||
if(rimeaddr_cmp(&msg.sender, &rimeaddr_node_addr) &&
|
if(rimeaddr_cmp(&msg.sender, &rimeaddr_node_addr) &&
|
||||||
|
@ -463,7 +463,7 @@ static int
|
||||||
read_packet(void)
|
read_packet(void)
|
||||||
{
|
{
|
||||||
struct xmac_hdr *hdr;
|
struct xmac_hdr *hdr;
|
||||||
u8_t len;
|
uint8_t len;
|
||||||
|
|
||||||
rimebuf_clear();
|
rimebuf_clear();
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ read_packet(void)
|
||||||
someone_is_sending = 1;
|
someone_is_sending = 1;
|
||||||
waiting_for_packet = 1;
|
waiting_for_packet = 1;
|
||||||
on();
|
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)) {
|
} else if(rimeaddr_cmp(&hdr->receiver, &rimeaddr_null)) {
|
||||||
/* If the receiver address is null, the strobe is sent to
|
/* If the receiver address is null, the strobe is sent to
|
||||||
|
|
Loading…
Reference in a new issue