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.
Fork of EV-COG-AD3029LZ by
Diff: SimpleSpirit1.cpp
- Revision:
- 9:3db68ab23070
- Parent:
- 8:10967c884e38
- Child:
- 11:b769d6caad82
--- a/SimpleSpirit1.cpp Mon Oct 24 08:34:33 2016 +0200
+++ b/SimpleSpirit1.cpp Tue Oct 25 10:54:41 2016 +0200
@@ -59,6 +59,10 @@
_led(led),
_current_irq_callback()
{
+}
+
+/** Init Function **/
+void SimpleSpirit1::init() {
/* reset irq disable counter and irq callback & disable irq */
_nr_of_irq_disables = 0;
disable_spirit_irq();
@@ -82,10 +86,7 @@
receiving_packet = 0;
last_rssi = 0 ; //MGR
last_lqi = 0 ; //MGR
-}
-/** Init Function **/
-void SimpleSpirit1::init() {
/* set frequencies */
radio_set_xtal_freq(XTAL_FREQUENCY);
mgmt_set_freq_base((uint32_t)BASE_FREQUENCY);
@@ -565,7 +566,7 @@
CLEAR_TXBUF();
/* call user callback */
if(_current_irq_callback) {
- _current_irq_callback(-1); // betzw - TODO: define enums for callback values
+ _current_irq_callback(TX_ERR);
}
}
}
@@ -580,7 +581,7 @@
CLEAR_TXBUF();
/* call user callback */
if(_current_irq_callback) {
- _current_irq_callback(-1); // betzw - TODO: define enums for callback values
+ _current_irq_callback(TX_ERR);
}
}
}
@@ -595,7 +596,7 @@
CLEAR_TXBUF();
/* call user callback */
if(_current_irq_callback) {
- _current_irq_callback(-1); // betzw - TODO: define enums for callback values
+ _current_irq_callback(TX_ERR);
}
}
}
@@ -633,7 +634,7 @@
/* call user callback */
if(_current_irq_callback) {
- _current_irq_callback(0); // betzw - TODO: define enums for callback values
+ _current_irq_callback(TX_DONE); // betzw - TODO: define enums for callback values
}
}
@@ -678,7 +679,7 @@
/* call user callback */
if(_current_irq_callback) {
- _current_irq_callback(1); // betzw - TODO: define enums for callback values
+ _current_irq_callback(RX_DONE); // betzw - TODO: define enums for callback values
}
}
}
