Hi, when I comment out InitIOForLEDs(), this approach works.
Card found, starting... Ok.
Sectors per Cluster: 64
FAT Start sector: 142
Root start sector: 608
Data start sector: 512
ClockF:B800
Found file name is 2GUNS MP3
File size: 4554880bytes.
When I comment out InitIOForKeys(), this does not work. Music doesn’t play and I get this:
Card found, starting... Ok.
Sectors per Cluster: 64
FAT Start sector: 142
Root start sector: 608
Data start sector: 512
ClockF:B800
Did you try this and get a different result?
I don’t understand this code well enough to modify it to do something different:
void InitIOForKeys()
{
#if defined(__AVR_ATmega1280__)|| defined(__AVR_ATmega2560__)
DDRH &= ~(1<<VD);
DDRH &= ~(1<<BK);
DDRE &= ~(1<<PS);
DDRG &= ~(1<<VU);
DDRE &= ~(1<<NT);
//internal pull-high
PORTH |= (1<<VD | 1<<BK);
PORTE |= (1<<PS | 1<<NT);
PORTG |= 1<<VU ;
#else
DDRD &= ~(1<<VD);
DDRD &= ~(1<<BK);
DDRD &= ~(1<<PS);
DDRD &= ~(1<<VU);
DDRD &= ~(1<<NT);
//internal pull-high
PORTD |= (1<<VD | 1<<BK | 1<<PS | 1<<VU | 1<<NT);
#endif
}