diff --git a/bao1x-boot/boot1/src/platform/bao1x/debug.rs b/bao1x-boot/boot1/src/platform/bao1x/debug.rs index 274cea1fa..c169fa127 100644 --- a/bao1x-boot/boot1/src/platform/bao1x/debug.rs +++ b/bao1x-boot/boot1/src/platform/bao1x/debug.rs @@ -39,7 +39,7 @@ impl Uart { }); } else { let buf: [u8; 1] = [c]; - let uart_buf_addr = crate::platform::UART_IFRAM_ADDR; + let uart_buf_addr = bao1x_hal::board::UART_DMA_TX_BUF_PHYS; let mut udma_uart = unsafe { // safety: this is safe to call, because we set up clock and events prior to calling new. udma::Uart::get_handle( diff --git a/bao1x-boot/boot1/src/platform/bao1x/gfx.rs b/bao1x-boot/boot1/src/platform/bao1x/gfx.rs index 9648e1609..008272144 100644 --- a/bao1x-boot/boot1/src/platform/bao1x/gfx.rs +++ b/bao1x-boot/boot1/src/platform/bao1x/gfx.rs @@ -93,51 +93,3 @@ pub fn msg<'a>(fb: &mut dyn FrameBuffer, text: &'a str, ll_pos: Point, fg: Color } ll_pos.x += x_update; } - -pub fn line(fb: &mut dyn FrameBuffer, l: Line, clip: Option, xor: bool) { - let color: ColorNative; - if l.style.stroke_color.is_some() { - color = l.style.stroke_color.unwrap().into(); - } else { - return; - } - let mut x0 = l.start.x; - let mut y0 = l.start.y; - let x1 = l.end.x; - let y1 = l.end.y; - - let dx = (x1 - x0).abs(); - let sx = if x0 < x1 { 1 } else { -1 }; - let dy = -((y1 - y0).abs()); - let sy = if y0 < y1 { 1 } else { -1 }; - let mut err = dx + dy; // error value e_xy - loop { - if x0 >= 0 && y0 >= 0 && x0 < (fb.dimensions().x as _) && y0 < (fb.dimensions().y as _) { - if clip.is_none() || (clip.unwrap().intersects_point(Point::new(x0, y0))) { - if !xor { - fb.put_pixel(Point::new(x0 as _, y0 as _), color); - } else { - if let Some(existing) = fb.get_pixel(Point::new(x0 as _, y0 as _)) { - if existing == Mono::Black.into() { - fb.put_pixel(Point::new(x0 as _, y0 as _), Mono::White.into()); - } else { - fb.put_pixel(Point::new(x0 as _, y0 as _), Mono::Black.into()); - } - } - } - } - } - if x0 == x1 && y0 == y1 { - break; - } - let e2 = 2 * err; - if e2 >= dy { - err += dy; - x0 += sx; - } - if e2 <= dx { - err += dx; - y0 += sy; - } - } -}