Pancake Library for mbed

Revision:
1:2eaa0fea479c
Parent:
0:ee3420f81e2b
Child:
2:a711a6feb092
--- a/pancake.hpp	Sun Nov 22 14:50:54 2015 +0000
+++ b/pancake.hpp	Sat Nov 28 16:06:07 2015 +0000
@@ -1,12 +1,63 @@
 #include "mbed.h"
 
+typedef enum Pancake_Color{
+    P_Black,
+    P_White,
+    P_Red,
+    P_Peach,
+    P_Orange,
+    P_Yellow,
+    P_PaleBrown,
+    P_Brown,
+    P_YellowGreen,
+    P_Green,
+    P_LiteBlue,
+    P_Bule,
+    P_DarkBule,
+    P_BluePurple,
+    P_RedPurple,
+    P_Gray
+    }P_Color;
+
+class sound_t{
+    public:
+    sound_t()
+   {
+   }
+
+   sound_t(uint8_t oc,uint8_t sc,uint8_t tc) 
+   {
+       octave = oc;
+       scale = sc;
+       toneColor = tc; 
+   }
+    
+    uint8_t octave;
+    uint8_t scale;
+    uint8_t toneColor;
+    };
+
+
 class Pancake {
     public:
     Pancake(PinName tx,PinName rx);
     //~Pancake();
-    void sound1(uint8_t cn,uint8_t on ,uint8_t sn);
+    void sound1(uint8_t cn,sound_t &sound);
+    void sound(sound_t sounds[4]);
+    void setMusic(uint8_t channel,bool mode,uint8_t tempo,
+                    uint8_t toneColor,uint8_t score[],uint8_t size);
+    void playMusic();
+    void stopMusic();
+    void reset();
+    
+    void clearScreen();
+    void writeLine(uint8_t sx,uint8_t sy,uint8_t ex,uint8_t ey,P_Color color);
+    void writeStamp();
+    void writeImage();
+    void writeCircle();
 
     private:
-    void _sendCommand(uint8_t data[],uint8_t length);
-    Serial _pc;
-};
\ No newline at end of file
+    void sendCommand(uint8_t data[],uint8_t length);
+    Serial pc;
+    uint8_t spriteMode;
+};