#[repr(C)]pub struct ADC_ChannelConfTypeDef {
pub Channel: u32,
pub Rank: u32,
pub SamplingTime: u32,
}Expand description
@brief Structure definition of ADC channel for regular group @note The setting of these parameters with function HAL_ADC_ConfigChannel() is conditioned to ADC state. ADC state can be either: - For all parameters: ADC disabled or enabled without conversion on going on regular group. If ADC is not in the appropriate state to modify some parameters, these parameters setting is bypassed without error reporting (as it can be the expected behaviour in case of intended action to update another parameter (which fulfills the ADC state condition) on the fly).
Fields§
§Channel: u32< Specifies the channel to configure into ADC regular group. This parameter can be a value of @ref ADC_channels Note: Depending on devices, some channels may not be available on package pins. Refer to device datasheet for channels availability.
Rank: u32< Add or remove the channel from ADC regular group sequencer. On PY32F0 devices, number of ranks in the sequence is defined by number of channels enabled, rank of each channel is defined by channel number (channel 0 fixed on rank 0, channel 1 fixed on rank1, …).. Despite the channel rank is fixed, this parameter allow an additional possibility: to remove the selected rank (selected channel) from sequencer. This parameter can be a value of @ref ADC_rank
SamplingTime: u32< Sampling time value to be set for the selected channel. Unit: ADC clock cycles Conversion time is the addition of sampling time and processing time (12.5 ADC clock cycles at ADC resolution 12 bits, 10.5 cycles at 10 bits, 8.5 cycles at 8 bits, 6.5 cycles at 6 bits). This parameter can be a value of @ref ADC_sampling_times Caution: this setting impacts the entire regular group. Therefore, call of HAL_ADC_ConfigChannel() to configure a channel can impact the configuration of other channels previously set. Caution: Obsolete parameter. Use parameter “SamplingTimeCommon” in ADC initialization structure. If parameter “SamplingTimeCommon” is set to a valid sampling time, parameter “SamplingTime” is discarded. Note: In case of usage of internal measurement channels (VrefInt/TempSensor), sampling time constraints must be respected (sampling time can be adjusted in function of ADC clock frequency and sampling time setting) Refer to device datasheet for timings values, parameters TS_vrefint, TS_temp (values rough order: 5us to 17us).
Trait Implementations§
Source§impl Clone for ADC_ChannelConfTypeDef
impl Clone for ADC_ChannelConfTypeDef
Source§fn clone(&self) -> ADC_ChannelConfTypeDef
fn clone(&self) -> ADC_ChannelConfTypeDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more