Esempio n. 1
0
void start_sound()
{
	start_dactimer() ;
	init_dac() ;
	// TODO - for volume, shared with EEPROM?
	//init_twi() ;
}
Esempio n. 2
0
void start_sound()
{
	
	start_dactimer() ;
	init_dac() ;
	init_twi() ;
	setVolume( 2 ) ;

#ifdef REVB
#ifndef REVX	
	register Pio *pioptr ;
	pioptr = PIOA ;
	pioptr->PIO_CODR = 0x02000000L ;	// Set bit A25 OFF
	pioptr->PIO_PER = 0x02000000L ;		// Enable bit A25 (Stock buzzer)
	pioptr->PIO_OER = 0x02000000L ;		// Set bit A25 as output
#endif
#else
	register Pio *pioptr ;
	pioptr = PIOA ;
	pioptr->PIO_CODR = 0x00010000L ;	// Set bit A16 OFF
	pioptr->PIO_PER = 0x00010000L ;		// Enable bit A16 (Stock buzzer)
	pioptr->PIO_OER = 0x00010000L ;		// Set bit A16 as output
#endif
#ifdef REVX	
	configure_pins( PIO_PC26, PIN_ENABLE | PIN_LOW | PIN_OUTPUT | PIN_PORTC | PIN_NO_PULLUP ) ;
	audioOn() ;
#endif
}