Browse Source

Update analog.c

teensy4-core
Mike S 6 years ago
parent
commit
214071e0cd
No account linked to committer's email address
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      teensy4/analog.c

+ 0
- 2
teensy4/analog.c View File

ADC1_GC &= ~0x20; ADC1_GC &= ~0x20;


mode = ADC1_CFG & ~0xC000; mode = ADC1_CFG & ~0xC000;

if (num >= 32) { if (num >= 32) {
mode |= ADC_CFG_AVGS(3); mode |= ADC_CFG_AVGS(3);
//Serial.println(ADC_CFG_AVGS(3), BIN); //Serial.println(ADC_CFG_AVGS(3), BIN);
} else { } else {
mode |= ADC_CFG_AVGS(0); mode |= ADC_CFG_AVGS(0);
} }

ADC1_CFG = mode; ADC1_CFG = mode;
//enable averaging //enable averaging

Loading…
Cancel
Save