diff --git a/lib/include/maca.h b/lib/include/maca.h index 1540f682e..cd179e6d3 100644 --- a/lib/include/maca.h +++ b/lib/include/maca.h @@ -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 */ diff --git a/lib/maca.c b/lib/maca.c index f48c7bee3..804f0622c 100644 --- a/lib/maca.c +++ b/lib/maca.c @@ -2,7 +2,7 @@ #include #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();