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:
- 9:3db68ab23070
- Parent:
- 8:10967c884e38
- Child:
- 11:b769d6caad82
diff -r 10967c884e38 -r 3db68ab23070 SimpleSpirit1.h
--- a/SimpleSpirit1.h Mon Oct 24 08:34:33 2016 +0200
+++ b/SimpleSpirit1.h Tue Oct 25 10:54:41 2016 +0200
@@ -36,7 +36,9 @@
/*** A Simple Spirit1 Class ***/
-class SimpleSpirit1 { // NOTE: must be a singleton (due to mix of MBED/CUBE code)!!!
+// NOTE: must be a singleton (due to mix of MBED/CUBE code)!!!
+// NOTE: implementation is IRQ-save but (intentionally) NOT thread-safe!!!
+class SimpleSpirit1 {
protected:
static SimpleSpirit1 *_singleton;
@@ -329,6 +331,12 @@
#endif // CONTIKI
public:
+ enum {
+ RX_DONE,
+ TX_DONE,
+ TX_ERR
+ };
+
static SimpleSpirit1& CreateInstance(PinName mosi, PinName miso, PinName sclk,
PinName irq, PinName cs, PinName sdn,
PinName led = NC) {
@@ -400,4 +408,9 @@
uint8_t get_last_lqi(void) {
return last_lqi;
}
+
+ /** Reset Board **/
+ void reset_board(void) {
+ init();
+ }
};
