Adjust framebuffer size for the renderer
This commit is contained in:
parent
735d0a48bb
commit
376416c32e
|
|
@ -222,7 +222,7 @@ async fn test_bounce_buffers(
|
||||||
WIDTH_STORED_PIXELS * BYTES_PER_PIXEL,
|
WIDTH_STORED_PIXELS * BYTES_PER_PIXEL,
|
||||||
ROWS_PER_WINDOW,
|
ROWS_PER_WINDOW,
|
||||||
burst_config,
|
burst_config,
|
||||||
false,
|
true,
|
||||||
);
|
);
|
||||||
buf.send().await;
|
buf.send().await;
|
||||||
error!("TEST BOUNCE BUFFERS SECTION DONE");
|
error!("TEST BOUNCE BUFFERS SECTION DONE");
|
||||||
|
|
@ -600,8 +600,8 @@ async fn main_task(peripherals: MainPeripherals) {
|
||||||
|
|
||||||
info!("ST7701S-based LCD display initialized!");
|
info!("ST7701S-based LCD display initialized!");
|
||||||
|
|
||||||
test_bounce_buffers(peripherals.DMA_CH0, peripherals.SPI2, st7701s).await;
|
// test_bounce_buffers(peripherals.DMA_CH0, peripherals.SPI2, st7701s).await;
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
// RMK config
|
// RMK config
|
||||||
let vial_config = VialConfig::new(VIAL_KEYBOARD_ID, VIAL_KEYBOARD_DEF, &[(0, 0), (1, 1)]);
|
let vial_config = VialConfig::new(VIAL_KEYBOARD_ID, VIAL_KEYBOARD_DEF, &[(0, 0), (1, 1)]);
|
||||||
|
|
@ -687,6 +687,10 @@ async fn main_task(peripherals: MainPeripherals) {
|
||||||
peripherals.DMA_CH0,
|
peripherals.DMA_CH0,
|
||||||
peripherals.SPI2.into(),
|
peripherals.SPI2.into(),
|
||||||
st7701s.dpi,
|
st7701s.dpi,
|
||||||
|
BurstConfig {
|
||||||
|
internal_memory: InternalBurstConfig::Enabled,
|
||||||
|
external_memory: ExternalBurstConfig::Size32,
|
||||||
|
},
|
||||||
// The burst config (16/32/64) doesn't seem to affect the alignment of the row size.
|
// The burst config (16/32/64) doesn't seem to affect the alignment of the row size.
|
||||||
//
|
//
|
||||||
// | | ( displayed range ) |
|
// | | ( displayed range ) |
|
||||||
|
|
@ -708,7 +712,6 @@ async fn main_task(peripherals: MainPeripherals) {
|
||||||
|
|
||||||
info!("Framebuffer created!");
|
info!("Framebuffer created!");
|
||||||
|
|
||||||
// let window_size = [framebuffer.width, framebuffer.height];
|
|
||||||
let window_size = [framebuffer.height, framebuffer.width];
|
let window_size = [framebuffer.height, framebuffer.width];
|
||||||
let framebuffer_ptr = FramebufferPtr(framebuffer.as_target_pixels() as _);
|
let framebuffer_ptr = FramebufferPtr(framebuffer.as_target_pixels() as _);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -890,6 +890,7 @@ impl Framebuffer {
|
||||||
channel: DMA_CH0<'static>,
|
channel: DMA_CH0<'static>,
|
||||||
peripheral_src: AnySpi<'static>,
|
peripheral_src: AnySpi<'static>,
|
||||||
peripheral_dst: Dpi<'static, Blocking>,
|
peripheral_dst: Dpi<'static, Blocking>,
|
||||||
|
burst_config: BurstConfig,
|
||||||
front_porch_pixels: u32,
|
front_porch_pixels: u32,
|
||||||
width_pixels: u32,
|
width_pixels: u32,
|
||||||
height_pixels: u32,
|
height_pixels: u32,
|
||||||
|
|
@ -898,10 +899,6 @@ impl Framebuffer {
|
||||||
) -> Self {
|
) -> Self {
|
||||||
const BYTES_PER_PIXEL: usize = core::mem::size_of::<u16>();
|
const BYTES_PER_PIXEL: usize = core::mem::size_of::<u16>();
|
||||||
let buffer_size = width_pixels as usize * height_pixels as usize * BYTES_PER_PIXEL;
|
let buffer_size = width_pixels as usize * height_pixels as usize * BYTES_PER_PIXEL;
|
||||||
let burst_config = BurstConfig {
|
|
||||||
internal_memory: InternalBurstConfig::Enabled,
|
|
||||||
external_memory: ExternalBurstConfig::Size64,
|
|
||||||
};
|
|
||||||
let psram_buffer = Box::leak(allocate_dma_buffer_in(
|
let psram_buffer = Box::leak(allocate_dma_buffer_in(
|
||||||
buffer_size,
|
buffer_size,
|
||||||
burst_config,
|
burst_config,
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export component AppWindow inherits Window {
|
||||||
in property <string> dummy_identicon_symbols: "╔╚╰═█░▒▓☺☻╗╝╯═◈◎◐◑◒◓☀☁☂☃☄★☆☎☏⎈⌂☘☢☣☕⌚⌛⏰⚡⛄⛅☔♔♕♖♗♘♙♚♛♜♝♞♟♨♩♪♫⚐⚑⚔⚖⚙⚠⌘⏎✄✆✈✉✌";
|
in property <string> dummy_identicon_symbols: "╔╚╰═█░▒▓☺☻╗╝╯═◈◎◐◑◒◓☀☁☂☃☄★☆☎☏⎈⌂☘☢☣☕⌚⌛⏰⚡⛄⛅☔♔♕♖♗♘♙♚♛♜♝♞♟♨♩♪♫⚐⚑⚔⚖⚙⚠⌘⏎✄✆✈✉✌";
|
||||||
default-font-family: "IBM Plex Mono";
|
default-font-family: "IBM Plex Mono";
|
||||||
default-font-size: 16pt;
|
default-font-size: 16pt;
|
||||||
height: 368px;
|
height: 8px + 240px + 8px;
|
||||||
width: 960px;
|
width: 960px;
|
||||||
forward-focus: focus-scope;
|
forward-focus: focus-scope;
|
||||||
in property <AppState> app-state: AppState.login;
|
in property <AppState> app-state: AppState.login;
|
||||||
|
|
@ -69,9 +69,9 @@ export component AppWindow inherits Window {
|
||||||
}
|
}
|
||||||
vertical-box := VerticalBox {
|
vertical-box := VerticalBox {
|
||||||
width: 960px;
|
width: 960px;
|
||||||
height: 368px;
|
height: 8px + 240px + 8px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
padding-top: 120px;
|
padding-top: 8px;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: 240px;
|
height: 240px;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue