1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

refactor(core/ui): enable non-conflicting modules even if unused

[no changelog]
This commit is contained in:
matejcik 2024-05-13 16:40:11 +02:00 committed by matejcik
parent c2c1591f5c
commit 754b0a92b9
2 changed files with 5 additions and 14 deletions

View File

@ -205,7 +205,7 @@ impl BitBltFill {
} }
/// Fills a rectangle on the display with the specified color. /// Fills a rectangle on the display with the specified color.
#[cfg(all(not(feature = "xframebuffer"), feature = "new_rendering"))] #[cfg(feature = "new_rendering")]
pub fn display_fill(&self) { pub fn display_fill(&self) {
assert!(self.bitblt.dst_x + self.bitblt.width <= ffi::DISPLAY_RESX as u16); assert!(self.bitblt.dst_x + self.bitblt.width <= ffi::DISPLAY_RESX as u16);
assert!(self.bitblt.dst_y + self.bitblt.height <= ffi::DISPLAY_RESY as u16); assert!(self.bitblt.dst_y + self.bitblt.height <= ffi::DISPLAY_RESY as u16);
@ -424,7 +424,7 @@ impl<'a> BitBltCopy<'a> {
/// Copies a part of the source bitmap to the display. /// Copies a part of the source bitmap to the display.
/// ///
/// - The source bitmap uses the RGB565 format. /// - The source bitmap uses the RGB565 format.
#[cfg(all(not(feature = "xframebuffer"), feature = "new_rendering"))] #[cfg(feature = "new_rendering")]
pub fn display_copy(&self) { pub fn display_copy(&self) {
assert!(self.bitblt.dst_x + self.bitblt.width <= ffi::DISPLAY_RESX as u16); assert!(self.bitblt.dst_x + self.bitblt.width <= ffi::DISPLAY_RESX as u16);
assert!(self.bitblt.dst_y + self.bitblt.height <= ffi::DISPLAY_RESY as u16); assert!(self.bitblt.dst_y + self.bitblt.height <= ffi::DISPLAY_RESY as u16);

View File

@ -3,16 +3,12 @@ pub mod fb_mono8;
#[cfg(all(feature = "xframebuffer", feature = "display_mono"))] #[cfg(all(feature = "xframebuffer", feature = "display_mono"))]
pub use fb_mono8::render_on_display; pub use fb_mono8::render_on_display;
#[cfg(all(not(feature = "xframebuffer"), feature = "display_rgb565"))] #[cfg(feature = "display_rgb565")]
pub mod nofb_rgb565; pub mod nofb_rgb565;
#[cfg(all(not(feature = "xframebuffer"), feature = "display_rgb565"))] #[cfg(all(not(feature = "xframebuffer"), feature = "display_rgb565"))]
pub use nofb_rgb565::render_on_display; pub use nofb_rgb565::render_on_display;
#[cfg(all( #[cfg(all(feature = "xframebuffer", feature = "display_rgb565"))]
feature = "xframebuffer",
feature = "display_rgb565",
not(feature = "display_rgba8888")
))]
pub mod fb_rgb565; pub mod fb_rgb565;
#[cfg(all( #[cfg(all(
feature = "xframebuffer", feature = "xframebuffer",
@ -21,11 +17,7 @@ pub mod fb_rgb565;
))] ))]
pub use fb_rgb565::render_on_display; pub use fb_rgb565::render_on_display;
#[cfg(all( #[cfg(all(feature = "xframebuffer", feature = "display_rgba8888",))]
feature = "xframebuffer",
feature = "display_rgba8888",
not(feature = "display_rgb565")
))]
pub mod fb_rgba8888; pub mod fb_rgba8888;
#[cfg(all( #[cfg(all(
feature = "xframebuffer", feature = "xframebuffer",
@ -34,7 +26,6 @@ pub mod fb_rgba8888;
))] ))]
pub use fb_rgba8888::render_on_display; pub use fb_rgba8888::render_on_display;
#[cfg(not(feature = "new_rendering"))]
pub mod fake_display; pub mod fake_display;
#[cfg(not(feature = "new_rendering"))] #[cfg(not(feature = "new_rendering"))]
pub use fake_display::render_on_display; pub use fake_display::render_on_display;