diff options
| author | Ulf Lilleengen <[email protected]> | 2023-12-19 10:11:19 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2023-12-19 10:56:22 +0100 |
| commit | e45e3e76b564b0589a24c1ca56599640238fd672 (patch) | |
| tree | 9b3280a909e9a7da1b5b5e27b9cab698da747604 /cyw43-pio/src | |
| parent | 08e9a4d84a51a4a1511dcbbd73808731b4d44f06 (diff) | |
docs: embassy-rp rustdoc and refactoring
Diffstat (limited to 'cyw43-pio/src')
| -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(); |
