asad patel / stm-spirit1-rf-driver

Dependents:   DISCO_IOT-wifi_client

Fork of stm-spirit1-rf-driver by ST

Revision:
9:3db68ab23070
Parent:
8:10967c884e38
Child:
11:b769d6caad82
--- 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();
+    }
 };