瀏覽代碼

Allow AudioInputAnalog to use different pins

dds
PaulStoffregen 10 年之前
父節點
當前提交
fff6eda8eb
共有 2 個檔案被更改,包括 3 行新增3 行删除
  1. +1
    -2
      input_adc.cpp
  2. +2
    -1
      input_adc.h

+ 1
- 2
input_adc.cpp 查看文件

@@ -35,9 +35,8 @@ bool AudioInputAnalog::update_responsibility = false;
DMAChannel AudioInputAnalog::dma(false);


AudioInputAnalog::AudioInputAnalog() : AudioStream(0, NULL)
AudioInputAnalog::AudioInputAnalog(uint8_t pin) : AudioStream(0, NULL)
{
unsigned int pin = A2;
uint32_t i, sum=0;

// Configure the ADC and run at least one software-triggered

+ 2
- 1
input_adc.h 查看文件

@@ -33,7 +33,8 @@
class AudioInputAnalog : public AudioStream
{
public:
AudioInputAnalog();
AudioInputAnalog(uint8_t pin);
AudioInputAnalog() : AudioStream(0, NULL) { AudioInputAnalog(A2); }
virtual void update(void);
friend void dma_ch9_isr(void);
private:

Loading…
取消
儲存