Skip to content

Commit

Permalink
Add MG
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 12, 2024
1 parent e6908e2 commit 5b89010
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion esp-hal/MIGRATING-0.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(),
);
```

0 comments on commit 5b89010

Please sign in to comment.