Kazushi Mukaiyama / AkitaSM

Description: This library for Akita Sound module. very personal.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AkitaSM.h Source File

AkitaSM.h

00001 /**
00002  * ...
00003  * @author Kazushi Mukaiyama
00004  */
00005 
00006 #ifndef MBED_AKITASM_H
00007 #define MBED_AKITASM_H
00008  
00009 #include "mbed.h"
00010 
00011 /** An interface for the Akita MP3 Sound Module
00012  *
00013  */
00014 
00015 class AkitaSM  {
00016 public:
00017 
00018     /** Create an AkitaSM interface, connected to the specified pins
00019      *
00020      * @param sda I2C data line pin
00021      * @param scl I2C clock line pin
00022      */
00023     AkitaSM(int addr, PinName sda, PinName scl);
00024     
00025     void play(int index, bool loop=false);
00026     void stop();
00027     void control(char r, int cmd);
00028     char* isPlaying();
00029     
00030 private:
00031     I2C _i2c;
00032     int _addr;
00033     char _cmd[4];
00034 };
00035 
00036 #endif