Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Dec 17, 2024
1 parent 6380484 commit 773a752
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions esp-hal/src/spi/master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2882,12 +2882,9 @@ impl Driver {

/// Write bytes to SPI.
///
/// Copies the content of `words` in chunks of 64 bytes into the SPI
/// transmission FIFO. If `words` is longer than 64 bytes, multiple
/// sequential transfers are performed. This function will return before
/// all bytes of the last chunk to transmit have been sent to the wire. If
/// you must ensure that the whole messages was written correctly, use
/// [`Self::flush`].
/// This function will return before all bytes of the last chunk to transmit
/// have been sent to the wire. If you must ensure that the whole
/// messages was written correctly, use [`Self::flush`].
#[cfg_attr(place_spi_driver_in_ram, ram)]
fn write_bytes(&self, words: &[u8]) -> Result<(), Error> {
let num_chunks = words.len() / FIFO_SIZE;
Expand Down Expand Up @@ -2915,10 +2912,6 @@ impl Driver {
}

/// Write bytes to SPI.
///
/// Copies the content of `words` in chunks of 64 bytes into the SPI
/// transmission FIFO. If `words` is longer than 64 bytes, multiple
/// sequential transfers are performed.
#[cfg_attr(place_spi_driver_in_ram, ram)]
async fn write_bytes_async(&self, words: &[u8]) -> Result<(), Error> {
// The fifo has a limited fixed size, so the data must be chunked and then
Expand Down Expand Up @@ -3082,6 +3075,7 @@ impl Driver {
reg_block.cmd().modify(|_, w| w.usr().set_bit());
}

/// Starts the operation and waits for it to complete.
async fn start_operation_async(&self) {
self.clear_done_interrupt();
self.start_operation();
Expand Down

0 comments on commit 773a752

Please sign in to comment.