char-to-sound still broken

master
Paul Goeser 14 years ago
parent e95523dc68
commit a718933df0

16
gg.c

@ -87,6 +87,8 @@ int main(void)
debug=mmc_init();
// }
debug = 2-debug;
sei();
_delay_ms(1)
char_to_sound(25);
debug = mmc_read_part(1, (unsigned char *) &length, 4);
@ -100,7 +102,6 @@ int main(void)
timer_init_tiny26();
sei();
/*
unsigned long block = 0;
@ -112,21 +113,22 @@ int main(void)
// debug = 0;
for(;;);
}
void char_to_sound(uint8_t val){
uint8_t i,r,b, sound;
uint8_t i=0,r,b, sound=10;
uint16_t a,to;
for(b=0; b<8; b++){
if(val & 0x80){
/* if(val & 1){
sound = 16;
}else{
sound = 8;
}
val <<= 1;
}*/
// sound = (val&1)+1;
val >>= 1;
for(to=0; to<3200; to++){
i += sound;
i += sound*8;
a = i<<8;
r=1;
while(r){

Loading…
Cancel
Save