chrismoos / ili9486-driver

ILI9486 driver for Rust
5 stars 6 forks source link

Missing impl DrawTarget for ILI9486<RW, u16> #5

Open ohmyarch opened 3 years ago

ohmyarch commented 3 years ago
147 |     t.draw(&mut lcd_driver).unwrap();
    |            ^^^^^^^^^^^^^^^ the trait `DrawTarget<Rgb888>` is not implemented for `ILI9486<GPIO16ParallelInterface<OutputOnlyIoPin<PD14<Output<PushPull>>>, OutputOnlyIoPin<PD15<Output<PushPull>>>, OutputOnlyIoPin<PD0<Output<PushPull>>>, OutputOnlyIoPin<PD1<Output<PushPull>>>, OutputOnlyIoPin<PE7<Output<PushPull>>>, OutputOnlyIoPin<PE8<Output<PushPull>>>, OutputOnlyIoPin<PE9<Output<PushPull>>>, OutputOnlyIoPin<PE10<Output<PushPull>>>, OutputOnlyIoPin<PE11<Output<PushPull>>>, OutputOnlyIoPin<PE12<Output<PushPull>>>, OutputOnlyIoPin<PE13<Output<PushPull>>>, OutputOnlyIoPin<PE14<Output<PushPull>>>, OutputOnlyIoPin<PE15<Output<PushPull>>>, OutputOnlyIoPin<PD8<Output<PushPull>>>, OutputOnlyIoPin<PD9<Output<PushPull>>>, OutputOnlyIoPin<PD10<Output<PushPull>>>, OutputOnlyIoPin<PG12<Output<PushPull>>>, OutputOnlyIoPin<PG5<Output<PushPull>>>, OutputOnlyIoPin<PD4<Output<PushPull>>>, OutputOnlyIoPin<PD5<Output<PushPull>>>>, u16>`
    |
    = help: the following implementations were found:
              <ILI9486<RW, u8> as DrawTarget<RGBC>>
chrismoos commented 3 years ago

@ohmyarch Can you see if it's working now, just pushed a change.

ohmyarch commented 3 years ago

It works fine, thanks! But there may be other places need to be adapted, write_command() now takes u16:

lcd_driver.write_command(0x38_u16, &[]).unwrap();
lcd_driver.write_command(Command::DisplayInversionOn as u16, &[]).unwrap();