|
|
|
|
@ -57,7 +57,7 @@ ISR(TIMER1_OVF1_vect){
|
|
|
|
|
// OCR1B += 1; // test pwm
|
|
|
|
|
if(!--cnt_to_next){
|
|
|
|
|
ringbuf_get(&rb, &next);
|
|
|
|
|
OCR1B = next>>8;
|
|
|
|
|
OCR1B = (next>>8);
|
|
|
|
|
cnt_to_ocr_incr = 8 - ((next>>5) & 0x7);
|
|
|
|
|
cnt_to_next = 8;
|
|
|
|
|
/* if(!--length)
|
|
|
|
|
@ -80,7 +80,7 @@ int main(void)
|
|
|
|
|
_delay_ms(30); // wait for card to get power
|
|
|
|
|
uint8_t debug=0;
|
|
|
|
|
DDRA |= (1 << PA7);
|
|
|
|
|
PORTA |= (1 << PA7);
|
|
|
|
|
PORTA &= ~(1 << PA7);
|
|
|
|
|
ringbuf_init(&rb, buffer, BUFFER_SIZE);
|
|
|
|
|
debug = 1;
|
|
|
|
|
// while(debug){
|
|
|
|
|
@ -90,8 +90,10 @@ int main(void)
|
|
|
|
|
timer_init_tiny26();
|
|
|
|
|
sei();
|
|
|
|
|
_delay_ms(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mmc_read_part(0, (unsigned char *) &length, 4);
|
|
|
|
|
// char_to_sound(length&0xff);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -105,7 +107,11 @@ int main(void)
|
|
|
|
|
block++;
|
|
|
|
|
} // */
|
|
|
|
|
// debug = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// shut down
|
|
|
|
|
PORTA |= (1 << PA7);
|
|
|
|
|
DDRA &= ~(1 << PA7);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(;;);
|
|
|
|
|
}
|
|
|
|
|
|