Pārlūkot izejas kodu

Allow AudioInputAnalog to use different pins

dds
PaulStoffregen pirms 10 gadiem
vecāks
revīzija
fff6eda8eb
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. +1
    -2
      input_adc.cpp
  2. +2
    -1
      input_adc.h

+ 1
- 2
input_adc.cpp Parādīt failu

@@ -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 Parādīt failu

@@ -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:

Notiek ielāde…
Atcelt
Saglabāt