Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO_IOT-wifi_client
Fork of stm-spirit1-rf-driver by
Diff: SimpleSpirit1.h
- Revision:
- 22:9165bd73c61e
- Parent:
- 19:42df12d5f750
- Child:
- 23:4192649f35da
--- a/SimpleSpirit1.h Tue Nov 08 11:04:30 2016 +0100
+++ b/SimpleSpirit1.h Wed Nov 09 11:21:55 2016 +0100
@@ -1,5 +1,6 @@
/*** Mbed Includes ***/
#include "mbed.h"
+#include "mbed_debug.h"
/*** Cube Includes ***/
@@ -78,6 +79,9 @@
CLEAR_RXBUF();
_spirit_rx_err = false;
_spirit_tx_started = false;
+#ifndef NDEBUG
+ debug("\n\r%s (%d)\n\r", __func__, __LINE__);
+#endif
}
void start_rx_timeout(void) {
@@ -114,11 +118,15 @@
void disable_spirit_irq(void) {
_irq.disable_irq();
_nr_of_irq_disables++;
- MBED_ASSERT(_nr_of_irq_disables != 0);
+#ifndef NDEBUG
+ debug_if(_nr_of_irq_disables == 0, "\n\rassert failed in: %s (%d)\n\r", __func__, __LINE__);
+#endif
}
void enable_spirit_irq(void) {
- MBED_ASSERT(_nr_of_irq_disables > 0);
+#ifndef NDEBUG
+ debug_if(_nr_of_irq_disables == 0, "\n\rassert failed in: %s (%d)\n\r", __func__, __LINE__);
+#endif
if(--_nr_of_irq_disables == 0)
_irq.enable_irq();
}
