From 8cf380a488e5964a58ee420bb2312d2877dcc632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Thu, 26 Nov 2020 14:40:24 +0100 Subject: [PATCH] dac/adc: doc cleanup [nfc] --- src/adc.rs | 6 +++--- src/dac.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/adc.rs b/src/adc.rs index 145c5af..b275d27 100644 --- a/src/adc.rs +++ b/src/adc.rs @@ -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. diff --git a/src/dac.rs b/src/dac.rs index 2c61b10..95ae8b0 100644 --- a/src/dac.rs +++ b/src/dac.rs @@ -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, _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.