Shohei Yasutake / Mbed 2 deprecated koibumi2000

Dependencies:   fll mbed-rtos mbed

Revision:
1:1abcd83947bf
Parent:
0:c80e972b4c59
Child:
2:165723d41023
--- a/fll.h	Fri Feb 13 13:19:29 2015 +0000
+++ b/fll.h	Fri Feb 13 14:41:00 2015 +0000
@@ -22,7 +22,7 @@
 #define B_RIGHT 0x2000
 #define B_L1 0x4000
 
-#define QUEUE_SIZE 5
+#define QUEUE_SIZE 16
 
 typedef uint16_t button;
 
@@ -30,10 +30,11 @@
 {
 private:
     int i;
-    vector<button>* button_seq;
+    button* button_seq;
+    int size;
     bool loop;
 public:
-    Source(vector<button>* bs, bool l);
+    Source(button *bs, int s, bool l);
     virtual button await();
 };
 
@@ -47,26 +48,11 @@
     virtual button await();
 };
 
-// Sink で使う。次に持ち越すキーのクラス。Option[Key] みたいな感じ
-class Carry
-{
-private:
-    button btn;
-    static const button none = 0x8000; // 1000 0000 0000 0000
-public:
-    Carry();
-    bool is_empty();
-    button get();
-    void set(button b);
-    void empty();
-};
-
 // ストリームの終端になっていて、キー入力をするスレッドに向けてキーを送る
 class Sink
 {
 private:
     Source* source;
-    Carry* carry;
     rtos::Mail<button, QUEUE_SIZE>* queue;
     Mutex* queueMutex; // Main Thread と同じ Mutex でなければいけない
 public: