implement tx_callback

This commit is contained in:
Mariano Alvira 2010-03-26 13:33:49 -04:00
parent 556477e6a0
commit 097922e709
2 changed files with 4 additions and 2 deletions

View File

@ -137,6 +137,7 @@ extern volatile uint8_t fcs_mode;
#define set_fcs_mode(x) fcs_mode = (x)
extern void maca_rx_callback(volatile packet_t *p) __attribute__((weak));
extern void maca_tx_callback(volatile packet_t *p) __attribute__((weak));
/******************************************************************************/
/* everything under this comment is messy, needs cleaning, and will */

View File

@ -2,7 +2,7 @@
#include <stdio.h>
#ifndef DEBUG_MACA
#define DEBUG_MACA 0
#define DEBUG_MACA 1
#endif
#if (DEBUG_MACA == 0)
#define PRINTF(...)
@ -401,11 +401,12 @@ void maca_isr(void) {
if(action_complete_irq()) {
/* PRINTF("maca action complete %d\n\r", get_field(*MACA_CONTROL,SEQUENCE)); */
if(last_post == TX_POST) {
if(maca_tx_callback != 0) { maca_tx_callback(tx_head); }
free_tx_head();
last_post = NO_POST;
}
ResumeMACASync();
*MACA_CLRIRQ = (1 << maca_irq_acpl);
*MACA_CLRIRQ = (1 << maca_irq_acpl);
}
decode_status();