mbed library for DFPlayer mini

Dependents:   InvertedPendulum2017 Lib_DFPlayerMini

Files at this revision

API Documentation at this revision

Comitter:
bluefish
Date:
Fri Apr 20 18:13:28 2018 +0000
Parent:
0:6e015ec7e3a7
Commit message:
MPU9250??????????

Changed in this revision

Lib_DFPlayerMini.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6e015ec7e3a7 -r e64636383d8c Lib_DFPlayerMini.cpp
--- a/Lib_DFPlayerMini.cpp	Fri Sep 15 14:54:35 2017 +0000
+++ b/Lib_DFPlayerMini.cpp	Fri Apr 20 18:13:28 2018 +0000
@@ -1,15 +1,17 @@
 #include "Lib_DFPlayerMini.h"
 
+// constructor
 DFPlayerMini::DFPlayerMini( PinName busy, PinName tx, PinName rx ) : _busy(busy), _serial( tx, rx ){
     _func = NULL;
     return;
 }
 
+// destructor
 DFPlayerMini::~DFPlayerMini(){
     return;    
 }
 
-// スタート
+// begin
 void DFPlayerMini::begin(){
     _busy.mode( PullUp );    
     _serial.baud(9600);
@@ -17,6 +19,7 @@
     return;   
 }
 
+// attach busy interrupt
 void DFPlayerMini::attachBusyInterrupt( BUSYFUNCPTR func ){
     _func   =   func;
     if( _func != NULL ){
@@ -65,14 +68,14 @@
     return;
 }
 
-// ボリュームの設定
+// set volume
 void DFPlayerMini::volumeSet( uint8_t vol ){
     vol = ( vol > 30 ) ? 30 : vol ;
     _send_command( DFPLAYER_VOL_SET, 0x00, vol );
     return;
 }
 
-// コマンドの送信
+// send command
 void DFPlayerMini::_send_command( DFPLAYERMINICOM com, uint8_t param1, uint8_t param2 ){
     uint8_t buf[8];