센서보드 RF IRQ 테스트 중

Fork of stm-spirit1-rf-driver by ST

Revision:
47:3a30b960a8c2
Parent:
46:d104e58c5caf
Child:
48:373e1b7e424f
--- a/source/SimpleSpirit1.cpp	Mon Dec 19 13:21:59 2016 +0100
+++ b/source/SimpleSpirit1.cpp	Thu Dec 22 08:25:22 2016 +0100
@@ -109,11 +109,13 @@
 	irq_set_status(TX_DATA_SENT, S_ENABLE);
 	irq_set_status(RX_DATA_READY,S_ENABLE);
 	irq_set_status(RX_DATA_DISC, S_ENABLE);
+	irq_set_status(VALID_SYNC, S_ENABLE);
 	irq_set_status(TX_FIFO_ERROR, S_ENABLE);
-	irq_set_status(TX_FIFO_ALMOST_EMPTY, S_ENABLE);
 	irq_set_status(RX_FIFO_ERROR, S_ENABLE);
+#ifndef RX_FIFO_THR_WA
+	irq_set_status(TX_FIFO_ALMOST_EMPTY, S_ENABLE);
 	irq_set_status(RX_FIFO_ALMOST_FULL, S_ENABLE);
-	irq_set_status(VALID_SYNC, S_ENABLE);
+#endif // !RX_FIFO_THR_WA
 
 	/* Configure Spirit1 */
 	radio_persistent_rx(S_ENABLE);
@@ -150,10 +152,6 @@
 	};
 	csma_ca_init(&x_csma_init);
 
-#ifdef RX_FIFO_THR_WA
-	linear_fifo_set_almost_full_thr_rx(0);
-#endif
-
 #ifdef USE_STANDBY_STATE
 	/* Puts the SPIRIT1 in STANDBY mode (125us -> rx/tx) */
 	cmd_strobe(SPIRIT1_STROBE_STANDBY);
@@ -467,6 +465,7 @@
 		x_irq_status.IRQ_TX_FIFO_ALMOST_EMPTY = S_RESET;
 	}
 
+#ifndef RX_FIFO_THR_WA
 	/* The IRQ_TX_FIFO_ALMOST_EMPTY notifies an nearly empty TX fifo */
 	if(x_irq_status.IRQ_TX_FIFO_ALMOST_EMPTY) {
 #ifdef DEBUG_IRQ
@@ -487,6 +486,7 @@
 		}
 		tx_buffer_pos += to_send;
 	}
+#endif // !RX_FIFO_THR_WA
 
 	/* Transmission error */
 	if(x_irq_status.IRQ_TX_FIFO_ERROR) {
@@ -551,6 +551,7 @@
 		}
 	}
 
+#ifndef RX_FIFO_THR_WA
 	/* RX FIFO almost full */
 	if(x_irq_status.IRQ_RX_FIFO_ALMOST_FULL) {
 #ifdef DEBUG_IRQ
@@ -567,6 +568,7 @@
 			_spirit_rx_pos += fifo_available;
 		}
 	}
+#endif // !RX_FIFO_THR_WA
 
 	/* Reception errors */
 	if((x_irq_status.IRQ_RX_FIFO_ERROR) || (x_irq_status.IRQ_RX_DATA_DISC)) {