mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-11 03:29:51 +00:00
implement tx_callback
This commit is contained in:
parent
556477e6a0
commit
097922e709
@ -137,6 +137,7 @@ extern volatile uint8_t fcs_mode;
|
|||||||
#define set_fcs_mode(x) fcs_mode = (x)
|
#define set_fcs_mode(x) fcs_mode = (x)
|
||||||
|
|
||||||
extern void maca_rx_callback(volatile packet_t *p) __attribute__((weak));
|
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 */
|
/* everything under this comment is messy, needs cleaning, and will */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifndef DEBUG_MACA
|
#ifndef DEBUG_MACA
|
||||||
#define DEBUG_MACA 0
|
#define DEBUG_MACA 1
|
||||||
#endif
|
#endif
|
||||||
#if (DEBUG_MACA == 0)
|
#if (DEBUG_MACA == 0)
|
||||||
#define PRINTF(...)
|
#define PRINTF(...)
|
||||||
@ -401,6 +401,7 @@ void maca_isr(void) {
|
|||||||
if(action_complete_irq()) {
|
if(action_complete_irq()) {
|
||||||
/* PRINTF("maca action complete %d\n\r", get_field(*MACA_CONTROL,SEQUENCE)); */
|
/* PRINTF("maca action complete %d\n\r", get_field(*MACA_CONTROL,SEQUENCE)); */
|
||||||
if(last_post == TX_POST) {
|
if(last_post == TX_POST) {
|
||||||
|
if(maca_tx_callback != 0) { maca_tx_callback(tx_head); }
|
||||||
free_tx_head();
|
free_tx_head();
|
||||||
last_post = NO_POST;
|
last_post = NO_POST;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user