seiichi horie / Mbed 2 deprecated synthesizer_f746

Dependencies:   amakusa mbed-dsp mbed shimabara ukifune unzen_nucleo_f746

Fork of skeleton_unzen_nucleo_f746 by seiichi horie

Files at this revision

API Documentation at this revision

Comitter:
shorie
Date:
Sat Jan 28 12:51:50 2017 +0000
Parent:
10:a00c73efc6c3
Child:
12:2b121255e2d1
Commit message:
Sample program is working. Gain control of the talk through and the SWM1,2,3 usage demo.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
shimabara.lib Show annotated file Show diff for this revision Revisions of this file
signal_processing.cpp Show annotated file Show diff for this revision Revisions of this file
ukifune.lib Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jan 27 02:18:26 2017 +0000
+++ b/main.cpp	Sat Jan 28 12:51:50 2017 +0000
@@ -41,6 +41,8 @@
 /*========================= Main program. ====================================*/
 int main() 
 {    
+    uint32_t pushing, releasing, holding;
+
         // start audio. Do not touch
     initialize_system();
  
@@ -49,6 +51,24 @@
     {       // place your foreground program here.
         process->set_volume( ukifune::get_volume(0) );   
        
+            // sample usage of button switch detection
+        ukifune::get_button_state( pushing, releasing, holding);
+
+            // pushing detection demo
+        if ( pushing & (1 << ukifune::swm1 ) )      // is SWM1 switch pusshing down?
+            ukifune::toggle_led( ukifune::led1_1 ); // then, toggle LED1_1 
+
+            // releasing detection demo     
+        if ( releasing & (1 << ukifune::swm2 ) )    // is SWM2 switch releasing? 
+            ukifune::toggle_led( ukifune::led2_1 ); // then toggle LED2_1
+       
+            // holding detection demo     
+        if ( holding & (1 << ukifune::swm3 ) )    // is SWM2 switch holding? 
+            ukifune::turn_led_on( ukifune::led3_1 );    // then turn LED3_1 on
+        else
+            ukifune::turn_led_off( ukifune::led3_1 );   // else off
+
+       
             // you have to call tick() every 20mS-50mS if you need get_volume()
         wait(0.05);
         ukifune::tick();
--- a/shimabara.lib	Fri Jan 27 02:18:26 2017 +0000
+++ b/shimabara.lib	Sat Jan 28 12:51:50 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/shorie/code/shimabara/#bbbf6cd235d4
+http://mbed.org/users/shorie/code/shimabara/#6d921f8c38d6
--- a/signal_processing.cpp	Fri Jan 27 02:18:26 2017 +0000
+++ b/signal_processing.cpp	Sat Jan 28 12:51:50 2017 +0000
@@ -21,8 +21,8 @@
         // place the signal processing coce here
     for ( int i= 0; i< block_size; i++ )
     {
-            rx_left_buffer[i] = tx_left_buffer[i] * this->volume_level;
-            rx_right_buffer[i] = tx_right_buffer[i] * this->volume_level;
+            tx_left_buffer[i]  = rx_left_buffer[i]  * this->volume_level;
+            tx_right_buffer[i] = rx_right_buffer[i] * this->volume_level;
     }
 }   // End of run()
     
--- a/ukifune.lib	Fri Jan 27 02:18:26 2017 +0000
+++ b/ukifune.lib	Sat Jan 28 12:51:50 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/shorie/code/ukifune/#dcaea5f9d9a7
+https://developer.mbed.org/users/shorie/code/ukifune/#e2a690a654ff