Skip to content

Commit

Permalink
example/opamp-internal: clean away some development things
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxxzer committed Dec 29, 2019
1 parent 6c0106c commit b192533
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/example/opamp-internal/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ void adc_setup() {
adc_set_regular_sequence(ADC_PERIPH, 1, channel_array);
adc_set_continuous_conversion_mode(ADC_PERIPH);
ADC_CFGR1(ADC_PERIPH) |= ADC_CFGR1_OVRMOD;

for (long i = 0; i < 10000; i++)
asm("nop");
}

void led_setup() {
Expand All @@ -75,7 +72,7 @@ void opamp_setup() {
rcc_periph_clock_enable(RCC_SYSCFG);

// select pga mode on inverting input
OPAMP_CSR(OPAMP1) |= OPAMP_CSR_VM_SEL_PGA;
OPAMP1_CSR |= OPAMP_CSR_VM_SEL_PGA;
// non inverting gain = 2
OPAMP1_CSR |= (0b00000 << OPAMP_CSR_PGA_GAIN_SHIFT);
// connect opamp vp to VINP0 signal
Expand Down

0 comments on commit b192533

Please sign in to comment.