-
-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This update significantly decouples the generic kernel code from the BSP code. Prior to this patch, the BSP had way too much business logic that should have always been the generic kernel's concern.
- Loading branch information
1 parent
7014c0c
commit 2e72a84
Showing
236 changed files
with
7,448 additions
and
4,235 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
// | ||
// Copyright (c) 2022 Andre Richter <[email protected]> | ||
|
||
//! Null console. | ||
use super::interface; | ||
use core::fmt; | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
// Public Definitions | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
pub struct NullConsole; | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
// Global instances | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
pub static NULL_CONSOLE: NullConsole = NullConsole {}; | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
// Public Code | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
impl interface::Write for NullConsole { | ||
fn write_char(&self, _c: char) {} | ||
|
||
fn write_fmt(&self, _args: fmt::Arguments) -> fmt::Result { | ||
fmt::Result::Ok(()) | ||
} | ||
|
||
fn flush(&self) {} | ||
} | ||
|
||
impl interface::Read for NullConsole { | ||
fn clear_rx(&self) {} | ||
} | ||
|
||
impl interface::Statistics for NullConsole {} | ||
impl interface::All for NullConsole {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.