mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14423 from mczerski/stm32_faster_analog_out
STM32: AnalogOut: do not call HAL_DAC_Start in dac_writepull/14435/head
commit
09eac13ffb
|
@ -74,6 +74,7 @@ void analogout_init(dac_t *obj, PinName pin)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_free(dac_t *obj)
|
||||
|
|
|
@ -86,6 +86,7 @@ void analogout_init(dac_t *obj, PinName pin)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_free(dac_t *obj)
|
||||
|
|
|
@ -86,6 +86,7 @@ void analogout_init(dac_t *obj, PinName pin)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_free(dac_t *obj)
|
||||
|
|
|
@ -121,6 +121,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_init(dac_t *obj, PinName pin)
|
||||
|
|
|
@ -81,6 +81,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_init(dac_t *obj, PinName pin)
|
||||
|
|
|
@ -86,6 +86,7 @@ void analogout_init(dac_t *obj, PinName pin)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_free(dac_t *obj)
|
||||
|
|
|
@ -90,6 +90,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_init(dac_t *obj, PinName pin)
|
||||
|
|
|
@ -109,6 +109,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_init(dac_t *obj, PinName pin)
|
||||
|
|
|
@ -74,6 +74,7 @@ void analogout_init(dac_t *obj, PinName pin)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_free(dac_t *obj)
|
||||
|
|
|
@ -90,6 +90,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_init(dac_t *obj, PinName pin)
|
||||
|
|
|
@ -81,6 +81,7 @@ void analogout_init(dac_t *obj, PinName pin)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_free(dac_t *obj)
|
||||
|
|
|
@ -97,6 +97,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
|
||||
/* DAC cannot be used in deepsleep/STOP mode */
|
||||
sleep_manager_lock_deep_sleep();
|
||||
|
|
|
@ -94,6 +94,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_init(dac_t *obj, PinName pin)
|
||||
|
|
|
@ -80,6 +80,7 @@ static void _analogout_init_direct(dac_t *obj, const PinMap *pinmap)
|
|||
}
|
||||
|
||||
analogout_write_u16(obj, 0);
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
void analogout_init(dac_t *obj, PinName pin)
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
static inline void dac_write(dac_t *obj, int value)
|
||||
{
|
||||
HAL_DAC_SetValue(&obj->handle, obj->channel, DAC_ALIGN_12B_R, (value & DAC_RANGE));
|
||||
HAL_DAC_Start(&obj->handle, obj->channel);
|
||||
}
|
||||
|
||||
static inline int dac_read(dac_t *obj)
|
||||
|
|
Loading…
Reference in New Issue