diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-01-01 22:10:24 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-01-01 22:10:24 -0500 |
commit | f75430e95f557e4e77db1d9131417fa82e694aa6 (patch) | |
tree | 87961405cdc570f52a1a0983856100e1e7b4fbf8 /src | |
parent | 8e797e6830896693ca95865c1a94f8e2c1e7bc13 (diff) | |
download | kutter-f75430e95f557e4e77db1d9131417fa82e694aa6.tar.gz kutter-f75430e95f557e4e77db1d9131417fa82e694aa6.tar.xz kutter-f75430e95f557e4e77db1d9131417fa82e694aa6.zip |
gpio: Fix sam38xe ADC startup check
The status register needs to be inspected, not the enable register.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/sam3x8e/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sam3x8e/gpio.c b/src/sam3x8e/gpio.c index 5445c397..ab7853c2 100644 --- a/src/sam3x8e/gpio.c +++ b/src/sam3x8e/gpio.c @@ -134,7 +134,7 @@ gpio_adc_setup(uint8_t pin) if (adc_pins[chan] != pin) continue; // Found PIN - if (!(PMC->PMC_PCER1 & (1 << (ID_ADC-32)))) { + if (!(PMC->PMC_PCSR1 & (1 << (ID_ADC-32)))) { // Setup ADC PMC->PMC_PCER1 = 1 << (ID_ADC-32); uint32_t prescal = SystemCoreClock / (2 * ADC_FREQ_MAX) - 1; |