diff options
| author | Ulf Lilleengen <[email protected]> | 2023-12-19 11:28:05 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-19 11:28:05 +0000 |
| commit | ca2e3759ad31f511c239d30132a28714b0e402db (patch) | |
| tree | 8619875468c1853f1206c7d0eb377a084ca2f1df /cyw43-pio | |
| parent | 6f21f0680e480917d4153cd7d62a84e34b423f6c (diff) | |
| parent | 486b67e89522d7e36f6b1078ff8018d64447b39e (diff) | |
Merge pull request #2315 from embassy-rs/embassy-rp-rustdoc-1
docs: embassy-rp rustdoc and refactoring
Diffstat (limited to 'cyw43-pio')
| -rw-r--r-- | cyw43-pio/src/lib.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cyw43-pio/src/lib.rs b/cyw43-pio/src/lib.rs index 41b670324..8304740b3 100644 --- a/cyw43-pio/src/lib.rs +++ b/cyw43-pio/src/lib.rs | |||
| @@ -6,8 +6,8 @@ use core::slice; | |||
| 6 | use cyw43::SpiBusCyw43; | 6 | use cyw43::SpiBusCyw43; |
| 7 | use embassy_rp::dma::Channel; | 7 | use embassy_rp::dma::Channel; |
| 8 | use embassy_rp::gpio::{Drive, Level, Output, Pin, Pull, SlewRate}; | 8 | use embassy_rp::gpio::{Drive, Level, Output, Pin, Pull, SlewRate}; |
| 9 | use embassy_rp::pio::{Common, Config, Direction, Instance, Irq, PioPin, ShiftDirection, StateMachine}; | 9 | use embassy_rp::pio::{instr, Common, Config, Direction, Instance, Irq, PioPin, ShiftDirection, StateMachine}; |
| 10 | use embassy_rp::{pio_instr_util, Peripheral, PeripheralRef}; | 10 | use embassy_rp::{Peripheral, PeripheralRef}; |
| 11 | use fixed::FixedU32; | 11 | use fixed::FixedU32; |
| 12 | use pio_proc::pio_asm; | 12 | use pio_proc::pio_asm; |
| 13 | 13 | ||
| @@ -152,10 +152,10 @@ where | |||
| 152 | defmt::trace!("write={} read={}", write_bits, read_bits); | 152 | defmt::trace!("write={} read={}", write_bits, read_bits); |
| 153 | 153 | ||
| 154 | unsafe { | 154 | unsafe { |
| 155 | pio_instr_util::set_x(&mut self.sm, write_bits as u32); | 155 | instr::set_x(&mut self.sm, write_bits as u32); |
| 156 | pio_instr_util::set_y(&mut self.sm, read_bits as u32); | 156 | instr::set_y(&mut self.sm, read_bits as u32); |
| 157 | pio_instr_util::set_pindir(&mut self.sm, 0b1); | 157 | instr::set_pindir(&mut self.sm, 0b1); |
| 158 | pio_instr_util::exec_jmp(&mut self.sm, self.wrap_target); | 158 | instr::exec_jmp(&mut self.sm, self.wrap_target); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | self.sm.set_enable(true); | 161 | self.sm.set_enable(true); |
| @@ -179,10 +179,10 @@ where | |||
| 179 | defmt::trace!("write={} read={}", write_bits, read_bits); | 179 | defmt::trace!("write={} read={}", write_bits, read_bits); |
| 180 | 180 | ||
| 181 | unsafe { | 181 | unsafe { |
| 182 | pio_instr_util::set_y(&mut self.sm, read_bits as u32); | 182 | instr::set_y(&mut self.sm, read_bits as u32); |
| 183 | pio_instr_util::set_x(&mut self.sm, write_bits as u32); | 183 | instr::set_x(&mut self.sm, write_bits as u32); |
| 184 | pio_instr_util::set_pindir(&mut self.sm, 0b1); | 184 | instr::set_pindir(&mut self.sm, 0b1); |
| 185 | pio_instr_util::exec_jmp(&mut self.sm, self.wrap_target); | 185 | instr::exec_jmp(&mut self.sm, self.wrap_target); |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | // self.cs.set_low(); | 188 | // self.cs.set_low(); |
