new tests
This commit is contained in:
parent
d8e725275a
commit
b1ecce7212
|
@ -6,6 +6,9 @@
|
|||
#include <keyboard.h>
|
||||
#include <mpu.h>
|
||||
|
||||
#include "string.h"
|
||||
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
//#define PI 3.141592653584
|
||||
|
@ -22,12 +25,14 @@ void switchStatePin()
|
|||
}
|
||||
}*/
|
||||
|
||||
const char* bincod = "111010001100100011101" ;
|
||||
|
||||
unsigned char range = 0;
|
||||
|
||||
void lect440()
|
||||
{
|
||||
unsigned char range = 1;
|
||||
|
||||
if((0xEC88E >> range) & 1)
|
||||
if(bincod[range]- '0')
|
||||
{
|
||||
if(isSH3())
|
||||
{
|
||||
|
@ -38,7 +43,6 @@ unsigned char range = 1;
|
|||
*(volatile unsigned char*)SH7305_PJDR ^= 0x04;
|
||||
}
|
||||
}
|
||||
range = (range < 20 ? range + 1 : 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -46,8 +50,9 @@ unsigned char range = 1;
|
|||
int main(void)
|
||||
{
|
||||
unsigned int key=0;
|
||||
unsigned char range = 1;
|
||||
int freq = 220;
|
||||
|
||||
int freq = 440;
|
||||
//unsigned int i=0;
|
||||
|
||||
setup();
|
||||
|
@ -58,12 +63,12 @@ int main(void)
|
|||
|
||||
dprint(1, 1, "%d", freq);
|
||||
|
||||
range = (range < 20 ? range +1 : 0);
|
||||
// PrintMini(1, 1, itoa(freq, str, 10), 0);
|
||||
dprint(1, 10, "%d", !isSH3());
|
||||
|
||||
// dprint(1, 20, "%d", range);
|
||||
|
||||
|
||||
//PrintMini(1, 10, itoa(is_SH4, str, 10), 0);
|
||||
dupdate();
|
||||
|
||||
|
@ -71,8 +76,11 @@ int main(void)
|
|||
|
||||
switch(key)
|
||||
{
|
||||
case KEY_RIGHT : freq+=10; break;
|
||||
case KEY_LEFT : freq-=10; break;
|
||||
case KEY_RIGHT : freq+=1; break;
|
||||
case KEY_LEFT : freq-=1; break;
|
||||
case KEY_UP : freq+=10; break;
|
||||
case KEY_DOWN : freq-=10; break;
|
||||
|
||||
case KEY_EXE :
|
||||
timer_start(TIMER_USER, freq, Clock_Hz, lect440, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue