mirror of https://github.com/Desuuuu/klipper.git
atsamd: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
c07371a2f0
commit
7b3331ff52
|
@ -21,7 +21,8 @@ static const uint8_t adc_pins[] = {
|
|||
};
|
||||
#elif CONFIG_MACH_SAMD51
|
||||
|
||||
#define SAMD51_ADC_SYNC(ADC, BIT) while(ADC->SYNCBUSY.reg & ADC_SYNCBUSY_ ## BIT)
|
||||
#define SAMD51_ADC_SYNC(ADC, BIT) \
|
||||
while(ADC->SYNCBUSY.reg & ADC_SYNCBUSY_ ## BIT)
|
||||
static const uint8_t adc_pins[] = {
|
||||
/* ADC0 */
|
||||
GPIO('A', 2), GPIO('A', 3), GPIO('B', 8), GPIO('B', 9), GPIO('A', 4),
|
||||
|
@ -108,14 +109,16 @@ adc_init(void)
|
|||
while(ADC0->SYNCBUSY.reg & ADC_SYNCBUSY_REFCTRL);
|
||||
ADC0->SAMPCTRL.reg = ADC_SAMPCTRL_SAMPLEN(63);
|
||||
while (ADC0->SYNCBUSY.reg & ADC_SYNCBUSY_SAMPCTRL);
|
||||
ADC0->CTRLA.reg = ADC_CTRLA_PRESCALER(ADC_CTRLA_PRESCALER_DIV32_Val) | ADC_CTRLA_ENABLE;
|
||||
ADC0->CTRLA.reg = (ADC_CTRLA_PRESCALER(ADC_CTRLA_PRESCALER_DIV32_Val)
|
||||
| ADC_CTRLA_ENABLE);
|
||||
|
||||
// ADC1
|
||||
ADC1->REFCTRL.reg = ADC_REFCTRL_REFSEL_INTVCC1;
|
||||
while(ADC1->SYNCBUSY.reg & ADC_SYNCBUSY_REFCTRL);
|
||||
ADC1->SAMPCTRL.reg = ADC_SAMPCTRL_SAMPLEN(63);
|
||||
while(ADC1->SYNCBUSY.reg & ADC_SYNCBUSY_SAMPCTRL);
|
||||
ADC1->CTRLA.reg = ADC_CTRLA_PRESCALER(ADC_CTRLA_PRESCALER_DIV32_Val) | ADC_CTRLA_ENABLE;
|
||||
ADC1->CTRLA.reg = (ADC_CTRLA_PRESCALER(ADC_CTRLA_PRESCALER_DIV32_Val)
|
||||
| ADC_CTRLA_ENABLE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue