Exemplo n.º 1
0
void gadcHighSpeedInit(uint32_t physdev, uint32_t frequency, adcsample_t *buffer, size_t bufcount, size_t samplesPerEvent)
{
	gadcHighSpeedStop();		/* This does the init for us */

	/* Just save the details and reset everything for now */
	hs.frequency = frequency;
	hs.buffer = buffer;
	hs.bufcount = bufcount;
	hs.samplesPerEvent = samplesPerEvent;
	hs.lastcount = 0;
	hs.lastbuffer = 0;
	hs.lastflags = 0;
	hs.lld.physdev = physdev;
	hs.lld.buffer = buffer;
	hs.lld.count = samplesPerEvent;
	hs.lld.now = FALSE;
	hs.samplesPerConversion = gadc_lld_samples_per_conversion(physdev);
	hs.remaining = bufcount;
	hs.bsem = 0;
	hs.pEvent = 0;
	hs.isrfn = 0;
}
Exemplo n.º 2
0
void gadc_lld_stop(void) {
	gadcHighSpeedStop();
}