#[repr(usize)]pub enum RPGpio {
Show 30 variants
GPIO0 = 0,
GPIO1 = 1,
GPIO2 = 2,
GPIO3 = 3,
GPIO4 = 4,
GPIO5 = 5,
GPIO6 = 6,
GPIO7 = 7,
GPIO8 = 8,
GPIO9 = 9,
GPIO10 = 10,
GPIO11 = 11,
GPIO12 = 12,
GPIO13 = 13,
GPIO14 = 14,
GPIO15 = 15,
GPIO16 = 16,
GPIO17 = 17,
GPIO18 = 18,
GPIO19 = 19,
GPIO20 = 20,
GPIO21 = 21,
GPIO22 = 22,
GPIO23 = 23,
GPIO24 = 24,
GPIO25 = 25,
GPIO26 = 26,
GPIO27 = 27,
GPIO28 = 28,
GPIO29 = 29,
}
Variants§
GPIO0 = 0
GPIO1 = 1
GPIO2 = 2
GPIO3 = 3
GPIO4 = 4
GPIO5 = 5
GPIO6 = 6
GPIO7 = 7
GPIO8 = 8
GPIO9 = 9
GPIO10 = 10
GPIO11 = 11
GPIO12 = 12
GPIO13 = 13
GPIO14 = 14
GPIO15 = 15
GPIO16 = 16
GPIO17 = 17
GPIO18 = 18
GPIO19 = 19
GPIO20 = 20
GPIO21 = 21
GPIO22 = 22
GPIO23 = 23
GPIO24 = 24
GPIO25 = 25
GPIO26 = 26
GPIO27 = 27
GPIO28 = 28
GPIO29 = 29
Trait Implementations§
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 From<RPGpio> for ChannelPin
Check ChannelNumber implementation for more details
impl From<RPGpio> for ChannelPin
Check ChannelNumber implementation for more details
Source§impl FromPrimitive for RPGpio
impl FromPrimitive for RPGpio
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Convert an
i64
to return an optional value of this type. If the
type cannot be represented by this value, then None
is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Convert an
u64
to return an optional value of this type. If the
type cannot be represented by this value, then None
is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Convert an
isize
to return an optional value of this type. If the
value cannot be represented by this value, then None
is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Convert an
i8
to return an optional value of this type. If the
type cannot be represented by this value, then None
is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Convert an
i16
to return an optional value of this type. If the
type cannot be represented by this value, then None
is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Convert an
i32
to return an optional value of this type. If the
type cannot be represented by this value, then None
is returned.Source§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Convert a
usize
to return an optional value of this type. If the
type cannot be represented by this value, then None
is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Convert an
u8
to return an optional value of this type. If the
type cannot be represented by this value, then None
is returned.impl Copy for RPGpio
impl StructuralPartialEq for RPGpio
Auto Trait Implementations§
impl Freeze for RPGpio
impl RefUnwindSafe for RPGpio
impl Send for RPGpio
impl Sync for RPGpio
impl Unpin for RPGpio
impl UnwindSafe for RPGpio
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