From 5b8901082846c0181713dd7118b02d706a283547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Tue, 12 Nov 2024 15:10:08 +0100 Subject: [PATCH] Add MG --- esp-hal/MIGRATING-0.21.md | 46 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/esp-hal/MIGRATING-0.21.md b/esp-hal/MIGRATING-0.21.md index 9304bddd0b6..17260c612f6 100644 --- a/esp-hal/MIGRATING-0.21.md +++ b/esp-hal/MIGRATING-0.21.md @@ -356,7 +356,9 @@ refer to the `Config` struct as `uart::Config`. +) ``` -## I8080 driver split `set_byte_order()` into `set_8bits_order()` and `set_byte_order()`. +## I8080 changes + +### I8080 driver split `set_byte_order()` into `set_8bits_order()` and `set_byte_order()`. If you were using an 8-bit bus. ```diff @@ -368,3 +370,45 @@ If you were using an 16-bit bus, you don't need to change anything, `set_byte_or If you were sharing the bus between an 8-bit and 16-bit device, you will have to call the corresponding method when you switch between devices. Be sure to read the documentation of the new methods. + +### Mixed mode constructor + +It is no longer possible to construct an `I8080` driver using a blocking-mode `Lcd` and an async-mode +DMA channel. Convert the DMA channel into blocking, or set up an async `LcdCam` first. + +```diff + let lcd_cam = LcdCam::new(peripherals.LCD_CAM); + let channel = ctx + .dma + .channel0 +- .configure(false, DmaPriority::Priority0) +- .into_async(); ++ .configure(false, DmaPriority::Priority0); + + let i8080 = I8080::new( + lcd_cam.lcd, + channel.tx, + pins, + 20.MHz(), + Config::default(), + ); +``` + +Or: + +```diff +-let lcd_cam = LcdCam::new(peripherals.LCD_CAM); ++let lcd_cam = LcdCam::new(peripherals.LCD_CAM).into_async(); + let channel = ctx + .dma + .channel0 + .into_async(); + + let i8080 = I8080::new( + lcd_cam.lcd, + channel.tx, + pins, + 20.MHz(), + Config::default(), + ); +``` \ No newline at end of file