PokittoGlobs.h
Go to the documentation of this file.
1
/**************************************************************************/
35
/**************************************************************************/
36
37
#ifndef POKITTO_GLOBS_H
38
#define POKITTO_GLOBS_H
39
40
#include <stdint.h>
41
42
#ifdef POK_SIM
43
#include "SimLCD.h"
44
#include "SimSound.h"
45
#include "PokittoSimulator.h"
46
#else
47
#include "mbed.h"
48
#include "HWLCD.h"
49
#include "HWSound.h"
50
#endif // POK_SIM
51
52
extern
int
random(
int
);
53
extern
int
random(
int
,
int
);
54
55
#define HIGH 1
56
#define LOW 0
57
58
#define swapWT(type, a, b) \
59
{ \
60
type _t_; \
61
_t_ = a; \
62
a = b; \
63
b = _t_; \
64
}
65
66
#define SAMPLE_RATE POK_AUD_FREQ //was 16000, was 57000
67
#define NUMFRAMES 570 //1 ms before refresh was 357
68
69
70
// TODO: move these into some suitable place
71
extern
void
fakeISR();
72
extern
void
audio_IRQ();
73
extern
void
update_SDAudioStream();
74
extern
uint16_t soundbyte;
75
76
#if POK_STREAMING_MUSIC
77
#define SPEAKER 3
78
// #define BUFFER_SIZE 512 //5120 // was 256
79
extern
unsigned
char
buffers[][BUFFER_SIZE];
80
extern
volatile
int
currentBuffer, oldBuffer;
81
extern
volatile
int
bufindex, vol;
82
extern
volatile
unsigned
char
* currentPtr;
83
extern
volatile
unsigned
char
* endPtr;
84
extern
int8_t streamvol;
85
extern
uint32_t streamcounter;
86
extern
uint8_t streamstep;
87
#endif
88
89
#endif // POKITTO_GLOBS_H
90
PokittoGlobs.h
Generated by
1.8.13