colorchord/embedded8266/user/hpatimer.h

28 lines
650 B
C
Raw Permalink Normal View History

2015-07-29 07:54:49 +02:00
//Copyright 2015 <>< Charles Lohr Under the MIT/x11 License, NewBSD License or
// ColorChord License. You Choose.
//This is a tool to make the ESP8266 run its ADC and pipe the samples into
//the sounddata fifo.
2015-07-27 09:34:00 +02:00
#ifndef _HPATIMER_H
#define _HPATIMER_H
#include <c_types.h>
2015-07-29 07:54:49 +02:00
#include "ccconfig.h" //For DFREQ
2015-07-27 09:34:00 +02:00
//Using a system timer on the ESP to poll the ADC in at a regular interval...
//BUFFSIZE must be a power-of-two
#define HPABUFFSIZE 512
extern volatile uint8_t sounddata[HPABUFFSIZE];
extern volatile uint16_t soundhead;
void StartHPATimer();
2015-07-29 07:54:49 +02:00
void ICACHE_FLASH_ATTR ContinueHPATimer();
void ICACHE_FLASH_ATTR PauseHPATimer();
2015-07-27 09:34:00 +02:00
#endif