Skip to content
Snippets Groups Projects
Commit be1d48b9 authored by Avon Gingell's avatar Avon Gingell
Browse files

fixing bugs

parent 6892eba7
Branches
No related tags found
No related merge requests found
Source diff could not be displayed: it is too large. Options to address this: view the blob.
(undo-tree-save-format-version . 1)
"1ccede45fef0f897206d08252ee0ff5f13388ca1"
[nil nil nil nil (25486 8636 663509 623000) 0 nil]
([nil current ((2661 . 2665) (t 25486 7972 349960 259000)) nil (25486 8643 916083 192000) 0 nil])
nil
......@@ -59,8 +59,11 @@
#endif
#if RFM12_USE_RX_CALLBACK
volatile static (*rfm12_rx_callback_func)(uint8_t, uint8_t *) = (void *)0x0000;
void rfm12_set_callback ((*in_func)(uint8_t, uint8_t *)) {
volatile static uint8_t (*rfm12_rx_callback_func)(uint8_t,
uint8_t *)
= NULL;
void rfm12_set_callback (volatile uint8_t (*in_func)(uint8_t,
uint8_t *)) {
rfm12_rx_callback_func = in_func;
}
#endif
......@@ -281,8 +284,9 @@ ISR(RFM12_INT_VECT)
/* 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);
rfm12_rx_callback_func(
rf_rx_buffers[ctrl.buffer_in_num].len,
(uint8_t*) rf_rx_buffers[ctrl.buffer_in_num].payload);
}
#endif
//switch to other buffer
......
......@@ -91,7 +91,7 @@ void rfm12_tick(void);
#if RFM12_USE_RX_CALLBACK
/* set the callback function pointer */
void rfm12_set_callback ((*in_func)(uint8_t, uint8_t *));
void rfm12_set_callback (int (*in_func)(uint8_t, uint8_t *));
#endif
//if receive mode is not disabled (default)
#if !(RFM12_TRANSMIT_ONLY)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment