Jonne Valola / PokittoLib Featured

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!

Files at this revision

API Documentation at this revision

Comitter:
Pokitto
Date:
Tue Jan 30 10:51:42 2018 +0000
Parent:
31:f4b9b85c7b62
Child:
33:7d20a1e51908
Commit message:
Fixed also GBSOUND

Changed in this revision

POKITTO_HW/HWSound.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/POKITTO_HW/HWSound.cpp	Tue Jan 30 10:41:47 2018 +0000
+++ b/POKITTO_HW/HWSound.cpp	Tue Jan 30 10:51:42 2018 +0000
@@ -125,7 +125,13 @@
 	if (Chip_TIMER_MatchPending(LPC_TIMER32_0, 1)) {
 		Chip_TIMER_ClearMatch(LPC_TIMER32_0, 1);
 		//pokSoundBufferedIRQ();
+		#if POK_GBSOUND > 0
+    	/** GAMEBUINO SOUND **/
+    	Pokitto::audio_IRQ();
+    	#else
+    	/** NOT GAMEBUINO SOUND **/
 		pokSoundIRQ();
+		#endif
 	}
 }
 
@@ -230,10 +236,10 @@
     pwmout_period_us(&audiopwm,POK_AUD_PWM_US); //was 31us
     pwmout_write(&audiopwm,0.1f);
 
-    #if POK_GBSOUND > 0
+    //#if POK_GBSOUND > 0
     /** GAMEBUINO SOUND **/
-    audio.attach_us(&audio_IRQ, 1000000/(POK_AUD_FREQ>>0));
-    #else
+    //audio.attach_us(&audio_IRQ, 1000000/(POK_AUD_FREQ>>0));
+    //#else
     /** NOT GAMEBUINO SOUND **/
     //audio.attach_us(&pokSoundBufferedIRQ, 1000000/(POK_AUD_FREQ>>0));
      /* Initialize 32-bit timer 0 clock */
@@ -266,7 +272,7 @@
 
 	/* Enable both timer interrupts */
 	NVIC_EnableIRQ((IRQn_Type)TIMER_32_0_IRQn);
-    #endif // POK_GAMEBUINO_SUPPORT
+    //#endif // POK_GAMEBUINO_SUPPORT
 
     //emptySong();
     //emptyOscillators();