Skip to content

Commit 0e22b66

Browse files
grodinomvertescher
authored andcommitted
Fix rectangle hardware acceleration
1 parent 4979643 commit 0e22b66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ltdc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ impl<T: 'static + SupportedWord> DisplayController<T> {
390390
);
391391

392392
// Line offset
393-
self._dma2d.oor.write(|w| w.lo().bits(top_left.0 as u16));
393+
self._dma2d.oor.write(|w| w.lo().bits(
394+
top_left.0 as u16 + self.config.active_width - bottom_right.0 as u16
395+
));
394396

395397
// Start transfert: register to memory mode
396398
self._dma2d.cr.modify(|_, w| w.mode().bits(0b11).start().set_bit());

0 commit comments

Comments
 (0)