Exemple #1
0
void audio_init(void)
{
	vs_rst(1);
	delay_m(100);

	vs_spi_open();

	delay_m(200);
	audio_reset();

	delay_m(50);

	AUDIO_FIFO_INIT();
	//audio_sin_test();

	vs_vol=DEFAULT_VOLUME;
	vs_sbamp=DEFAULT_BASSAMP;
	vs_sbfreq=DEFAULT_BASSFREQ;
	vs_stamp=DEFAULT_TREBLEAMP;
	vs_stfreq=DEFAULT_TREBLEFREQ;

		audio_set_volume(vs_vol);
	  vs_setbassfreq(vs_sbfreq);
	  vs_setbassamp(vs_sbamp);
	  vs_settreblefreq(vs_stfreq);
	  vs_settrebleamp(vs_stamp);
}
Exemple #2
0
void vs_init(void)
{
  DEBUGOUT("VS: init\n");

  vs_playing = 0;

  //reset vs buffer
  vs_bufreset();

  //reset vs
  vs_reset();

  //set volume, bass, treble
  vs_setvolume(DEFAULT_VOLUME);
  vs_setbassfreq(DEFAULT_BASSFREQ);
  vs_setbassamp(DEFAULT_BASSAMP);
  vs_settreblefreq(DEFAULT_TREBLEFREQ); 
  vs_settrebleamp(DEFAULT_TREBLEAMP);

  //init pin interrupt
  GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_1, GPIO_HIGH_LEVEL);
  GPIOPortIntRegister(GPIO_PORTA_BASE, vs_requesthandler);

  return;
}
Exemple #3
0
void vs_init(int unit)
{
  vs_status[unit].vs_playing = 0;

  //reset vs buffer
  vs_bufreset(unit);

  //reset vs
  vs_reset();

  //set volume, bass, treble
  vs_setvolume(unit, DEFAULT_VOLUME);
  vs_setbassfreq(unit, DEFAULT_BASSFREQ);
  vs_setbassamp(unit, DEFAULT_BASSAMP);
  vs_settreblefreq(unit, DEFAULT_TREBLEFREQ);
  vs_settrebleamp(unit, DEFAULT_TREBLEAMP);

  //init pin interrupt

  //TODO: needs change - init interrupts by unit
  //GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_1, GPIO_HIGH_LEVEL);
  //GPIOPortIntRegister(GPIO_PORTA_BASE, vs_requesthandler);

  return;
}