max1968: rm redundant adc config
This commit is contained in:
parent
85b50bf824
commit
9ae867cd88
@ -113,7 +113,6 @@ impl<C: ChannelPins> MAX1968Phy<C> {
|
||||
|
||||
impl MAX1968 {
|
||||
pub fn new(phy_ch0: MAX1968Phy<Channel0>, adc1: ADC1) -> Self {
|
||||
// Set ADC to a slowest sampling interval for more accurate calibration
|
||||
let config = AdcConfig::default()
|
||||
.clock(config::Clock::Pclk2_div_8)
|
||||
.default_sample_time(config::SampleTime::Cycles_480);
|
||||
@ -121,11 +120,6 @@ impl MAX1968 {
|
||||
let mut pins_adc = Adc::adc1(adc1, false, config);
|
||||
pins_adc.calibrate();
|
||||
|
||||
let config = AdcConfig::default()
|
||||
.clock(config::Clock::Pclk2_div_8)
|
||||
.default_sample_time(config::SampleTime::Cycles_480);
|
||||
pins_adc.apply_config(config);
|
||||
|
||||
MAX1968 {
|
||||
phy: phy_ch0,
|
||||
pins_adc: pins_adc,
|
||||
|
Loading…
Reference in New Issue
Block a user