mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
services/llio: Implement From instead of Into
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
parent
91e4b9fa15
commit
479694869a
2 changed files with 12 additions and 12 deletions
|
|
@ -27,9 +27,9 @@ impl From<usize> for UartType {
|
|||
}
|
||||
}
|
||||
}
|
||||
impl Into<usize> for UartType {
|
||||
fn into(self) -> usize {
|
||||
match self {
|
||||
impl From<UartType> for usize {
|
||||
fn from(uart_type: UartType) -> usize {
|
||||
match uart_type {
|
||||
UartType::Kernel => 0,
|
||||
UartType::Log => 1,
|
||||
UartType::Application => 2,
|
||||
|
|
@ -38,9 +38,9 @@ impl Into<usize> for UartType {
|
|||
}
|
||||
}
|
||||
// for the actual bitmask going to hardware
|
||||
impl Into<u32> for UartType {
|
||||
fn into(self) -> u32 {
|
||||
match self {
|
||||
impl From<UartType> for u32 {
|
||||
fn from(uart_type: UartType) -> u32 {
|
||||
match uart_type {
|
||||
UartType::Kernel => 0,
|
||||
UartType::Log => 1,
|
||||
UartType::Application => 2,
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ impl From<usize> for VibePattern {
|
|||
}
|
||||
}
|
||||
}
|
||||
impl Into<usize> for VibePattern {
|
||||
fn into(self) -> usize {
|
||||
match self {
|
||||
impl From<VibePattern> for usize {
|
||||
fn from(pat: VibePattern) -> usize {
|
||||
match pat {
|
||||
VibePattern::Long => 0,
|
||||
VibePattern::Double => 1,
|
||||
VibePattern::Short => 0xffff_ffff,
|
||||
|
|
@ -39,9 +39,9 @@ impl From<usize> for ClockMode {
|
|||
}
|
||||
}
|
||||
}
|
||||
impl Into<usize> for ClockMode {
|
||||
fn into(self) -> usize {
|
||||
match self {
|
||||
impl From<ClockMode> for usize {
|
||||
fn from(mode: ClockMode) -> usize {
|
||||
match mode {
|
||||
ClockMode::Low => 0,
|
||||
ClockMode::AllOn => 0xffff_ffff,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue