PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)
Dependents: YATTT sd_map_test cPong SnowDemo ... more
PokittoLib
Library for programming Pokitto hardware
How to Use
- Import this library to online compiler (see button "import" on the right hand side
- DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
- Change My_settings.h according to your project
- Start coding!
Diff: POKITTO_HW/HWSound.h
- Revision:
- 67:068fa6345036
- Parent:
- 43:6183b12dd99c
--- a/POKITTO_HW/HWSound.h Sat Mar 23 20:03:34 2019 +0000 +++ b/POKITTO_HW/HWSound.h Thu Apr 04 17:07:28 2019 +0000 @@ -40,9 +40,13 @@ #include "Pokitto_settings.h" #define SPEAKER 3 -#define BUFFER_SIZE 512*4 //*8 //*8 // 512 // was 512 (works really well with crabator) was 256 - -#define SBUFSIZE 512*4 +#if POK_HIGH_RAM == HIGH_RAM_MUSIC + #define BUFFER_SIZE 256*4 + #define SBUFSIZE 256*4 +#else + #define BUFFER_SIZE 512*4 //*8 //*8 // 512 // was 512 (works really well with crabator) was 256 + #define SBUFSIZE 512*4 +#endif #if POK_BOARDREV == 1 /** 2-layer board rev 1.3 **/ @@ -121,8 +125,8 @@ extern uint8_t streambyte, streamon, HWvolume; extern float pwm2; //virtual pwm output - extern void soundInit(); +extern void soundInit(uint8_t); extern void dac_write(uint8_t value); extern uint8_t ampIsOn(); extern void ampEnable(uint8_t v); @@ -149,7 +153,11 @@ extern void pokSoundBufferedIRQ(); #if POK_STREAMING_MUSIC > 0 +#if POK_HIGH_RAM == HIGH_RAM_MUSIC + extern unsigned char *buffers[]; +#else extern unsigned char buffers[][BUFFER_SIZE]; +#endif extern volatile int currentBuffer, oldBuffer; extern volatile int bufindex, vol; extern volatile unsigned char * currentPtr;