diff --git a/src/rfm12.c b/src/rfm12.c index ec74b251744a1e48c036cd6c47189936aaf9fe7c..f2ff9cb0d254077aab5440c0ec26d7e2944b0354 100644 --- a/src/rfm12.c +++ b/src/rfm12.c @@ -55,7 +55,7 @@ //for uart debugging #if RFM12_UART_DEBUG - #include "../examples/uart_lib/uart.h" + #include "../../uart.h" #endif #if RFM12_USE_RX_CALLBACK @@ -135,7 +135,7 @@ rfm12_control_t ctrl; #if (RFM12_USE_POLLING) void rfm12_poll(void) #else -ISR(RFM12_INT_VECT, ISR_NOBLOCK) +ISR(RFM12_INT_VECT) #endif { #ifdef USE_INT_PIN_CHECK @@ -278,6 +278,13 @@ ISR(RFM12_INT_VECT, ISR_NOBLOCK) UART_DEBUG_PUTC('D'); rf_rx_buffers[ctrl.buffer_in_num].status = STATUS_OCCUPIED; + /* Call the callback function */ + #if RFM12_USE_RX_CALLBACK + if (rfm12_rx_callback_func != 0x0000) { + rfm12_rx_callback_func(ctrl.rf_buffer_in->len, + ctrl.rf_buffer_in.buffer); + } + #endif //switch to other buffer ctrl.buffer_in_num ^= 1;