pub enum ChannelNumber {
Ch0,
Ch1,
Ch2,
Ch3,
Ch4,
Ch5,
Ch6,
Ch7,
}
Expand description
Channel identifier
There are a total of 8 eight PWM channels.
Variants§
Trait Implementations§
Source§impl Clone for ChannelNumber
impl Clone for ChannelNumber
Source§fn clone(&self) -> ChannelNumber
fn clone(&self) -> ChannelNumber
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ChannelNumber
impl Debug for ChannelNumber
Source§impl From<RPGpio> for ChannelNumber
Each GPIO pin can be configured as a PWM pin.
The following table shows the mapping between GPIO pins and PWM pins:
impl From<RPGpio> for ChannelNumber
Each GPIO pin can be configured as a PWM pin. The following table shows the mapping between GPIO pins and PWM pins:
GPIO | PWM |
---|---|
0 | 0A |
1 | 0B |
2 | 1A |
3 | 1B |
4 | 2A |
5 | 2B |
6 | 3A |
7 | 3B |
8 | 4A |
9 | 4B |
10 | 5A |
11 | 5B |
12 | 6A |
13 | 6B |
14 | 7A |
15 | 7B |
16 | 0A |
17 | 0B |
18 | 1A |
19 | 1B |
20 | 2A |
21 | 2B |
22 | 3A |
23 | 3B |
24 | 4A |
25 | 4B |
26 | 5A |
27 | 5B |
28 | 6A |
29 | 6B |
Note:
- The same PWM output can be selected on two GPIO pins. The same signal will appear on each GPIO.
- If a PWM B pin is used as an input, and is selected on multiple GPIO pins, then the PWM channel will see the logical OR of those two GPIO inputs
Source§impl PartialEq for ChannelNumber
impl PartialEq for ChannelNumber
impl Copy for ChannelNumber
impl StructuralPartialEq for ChannelNumber
Auto Trait Implementations§
impl Freeze for ChannelNumber
impl RefUnwindSafe for ChannelNumber
impl Send for ChannelNumber
impl Sync for ChannelNumber
impl Unpin for ChannelNumber
impl UnwindSafe for ChannelNumber
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more