class::hal::AdcAttributes

class hal::AdcAttributes
  : public hal::PinAssignmentPeriphAttributes< adc_attr_t, adc_pin_assignment_t >

This class is for containing ADC attributes.

Summary

[AdcAttributes](#classhal_1_1_adc_attributes_1a8dc17e51e0016debcc16105cd40c762b)()

[AdcAttributes](#classhal_1_1_adc_attributes_1a59aac62c125fb215512c5634d245d5bd)(  

u32 o_flags,
u32 freq
)

AdcAttributes & configure_group_channel(

u16 channel,
u32 rank,
u32 sampling_time
)

AdcAttributes & set_channel(

u16 channel
)

AdcAttributes & set_rank(

u32 rank
)

AdcAttributes & set_sampling_time(

u32 sampling_time
)

Members

AdcAttributes()

AdcAttributes(

u32 o_flags,
u32 freq
)


AdcAttributes & configure_group_channel(

u16 channel,
u32 rank,
u32 sampling_time
)

Configures a channel in a group for sampling.

Parameters

  • channel The channel number to sample

  • rank The rank (order) of the channel

  • sampling_time The sampling time (in ADC clocks for the channel)

AdcAttributes adc_attributes;
adc_attributes.configure_group_channel(0, 1, 15);
Adc adc(0);

adc.init();
adc.set_attributes(adc_attributes);

AdcAttributes & set_channel(

u16 channel
)


AdcAttributes & set_rank(

u32 rank
)


AdcAttributes & set_sampling_time(

u32 sampling_time
)


X

Thanks for Coming!

Subscribe to news and updates