'free_packet' in csma.c conflicted with 'free_packet' in maca.c

This commit is contained in:
kkrentz 2014-02-07 11:51:01 -08:00
parent 648d3576a0
commit 4493783ce9
8 changed files with 10 additions and 10 deletions

View File

@ -229,7 +229,7 @@ int contiki_maca_read(void *buf, unsigned short bufsize) {
} }
#endif #endif
PRINTF("\n\r"); PRINTF("\n\r");
free_packet(p); maca_free_packet(p);
return bufsize; return bufsize;
} else { } else {
return 0; return 0;

View File

@ -71,7 +71,7 @@ extern volatile uint8_t prm_mode;
void tx_packet(volatile packet_t *p); void tx_packet(volatile packet_t *p);
volatile packet_t* rx_packet(void); volatile packet_t* rx_packet(void);
volatile packet_t* get_free_packet(void); volatile packet_t* get_free_packet(void);
void free_packet(volatile packet_t *p); void maca_free_packet(volatile packet_t *p);
void free_all_packets(void); void free_all_packets(void);
extern volatile packet_t *rx_head, *tx_head; extern volatile packet_t *rx_head, *tx_head;

View File

@ -300,7 +300,7 @@ void bound_check(volatile packet_t *p) {
/* public packet routines */ /* public packet routines */
/* heads are to the right */ /* heads are to the right */
/* ends are to the left */ /* ends are to the left */
void free_packet(volatile packet_t *p) { void maca_free_packet(volatile packet_t *p) {
safe_irq_disable(MACA); safe_irq_disable(MACA);
BOUND_CHECK(p); BOUND_CHECK(p);
@ -495,7 +495,7 @@ void free_all_packets(void) {
free_head = 0; free_head = 0;
for(i=0; i<NUM_PACKETS; i++) { for(i=0; i<NUM_PACKETS; i++) {
free_packet((volatile packet_t *)&(packet_pool[i])); maca_free_packet((volatile packet_t *)&(packet_pool[i]));
} }
rx_head = 0; rx_end = 0; rx_head = 0; rx_end = 0;
tx_head = 0; tx_end = 0; tx_head = 0; tx_end = 0;
@ -517,7 +517,7 @@ void free_tx_head(void) {
p = tx_head; p = tx_head;
tx_head = tx_head->left; tx_head = tx_head->left;
if(tx_head == 0) { tx_end = 0; } if(tx_head == 0) { tx_end = 0; }
free_packet(p); maca_free_packet(p);
// print_packets("free tx head"); // print_packets("free tx head");
irq_restore(); irq_restore();

View File

@ -94,7 +94,7 @@ void main(void) {
/* print and free the packet */ /* print and free the packet */
printf("autoack-rx --- "); printf("autoack-rx --- ");
print_packet(p); print_packet(p);
free_packet(p); maca_free_packet(p);
} }
if(uart1_can_get()) { if(uart1_can_get()) {

View File

@ -139,7 +139,7 @@ void main(void) {
if(p) { if(p) {
printf("RX: "); printf("RX: ");
print_packet(p); print_packet(p);
free_packet(p); maca_free_packet(p);
} }
} }

View File

@ -146,7 +146,7 @@ void main(void) {
print_packet(p); print_packet(p);
type = get_packet_type((packet_t *) p); type = get_packet_type((packet_t *) p);
addr = 0; /* FIXME */ addr = 0; /* FIXME */
free_packet(p); maca_free_packet(p);
/* pick a new address if someone else is using ours */ /* pick a new address if someone else is using ours */
if(addr == my_addr) { if(addr == my_addr) {
my_addr = random_short_addr(); my_addr = random_short_addr();

View File

@ -87,7 +87,7 @@ void main(void) {
/* print and free the packet */ /* print and free the packet */
printf("rftest-rx --- "); printf("rftest-rx --- ");
print_packet(p); print_packet(p);
free_packet(p); maca_free_packet(p);
} }
if(uart1_can_get()) { if(uart1_can_get()) {

View File

@ -94,7 +94,7 @@ void main(void) {
check_maca(); check_maca();
while((p = rx_packet())) { while((p = rx_packet())) {
if(p) free_packet(p); if(p) maca_free_packet(p);
} }
p = get_free_packet(); p = get_free_packet();