dac/adc: doc cleanup [nfc]

This commit is contained in:
Robert Jördens 2020-11-26 14:40:24 +01:00
parent d8c6f39d0f
commit 8cf380a488
2 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ static mut ADC_BUF: [[[u16; SAMPLE_BUFFER_SIZE]; 2]; 2] =
macro_rules! adc_input {
($name:ident, $index:literal, $trigger_stream:ident, $data_stream:ident,
$spi:ident, $trigger_channel:ident, $dma_req:ident) => {
/// SPI is used as a ZST (zero-sized type) for indicating a DMA transfer into the SPI TX FIFO
/// $spi is used as a ZST (zero-sized type) for indicating a DMA transfer into the SPI TX FIFO
/// whenever the tim2 update dma request occurs.
struct $spi {
_channel: sampling_timer::tim2::$trigger_channel,
@ -68,7 +68,7 @@ macro_rules! adc_input {
}
}
/// Represents data associated with ADC0.
/// Represents data associated with ADC.
pub struct $name {
next_buffer: Option<&'static mut [u16; SAMPLE_BUFFER_SIZE]>,
transfer: Transfer<
@ -86,7 +86,7 @@ macro_rules! adc_input {
}
impl $name {
/// Construct the ADC0 input channel.
/// Construct the ADC input channel.
///
/// # Args
/// * `spi` - The SPI interface used to communicate with the ADC.

View File

@ -19,7 +19,7 @@ static mut DAC_BUF: [[[u16; SAMPLE_BUFFER_SIZE]; 2]; 2] =
macro_rules! dac_output {
($name:ident, $index:literal, $data_stream:ident,
$spi:ident, $trigger_channel:ident, $dma_req:ident) => {
/// SPI is used as a type for indicating a DMA transfer into the SPI TX FIFO
/// $spi is used as a type for indicating a DMA transfer into the SPI TX FIFO
struct $spi {
spi: hal::spi::Spi<hal::stm32::$spi, hal::spi::Disabled, u16>,
_channel: sampling_timer::tim2::$trigger_channel,
@ -50,7 +50,7 @@ macro_rules! dac_output {
}
}
/// Represents data associated with DAC0.
/// Represents data associated with DAC.
pub struct $name {
next_buffer: Option<&'static mut [u16; SAMPLE_BUFFER_SIZE]>,
// Note: SPI TX functionality may not be used from this structure to ensure safety with DMA.