Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marlin TFT port to LPC + Bonus: Full Hardware SPI Support #19139

Merged
merged 13 commits into from Aug 26, 2020

Conversation

rhapsodyv
Copy link
Sponsor Member

@rhapsodyv rhapsodyv commented Aug 24, 2020

Description

I ported the TFT IO to LPC. Tested in a SKR 1.4 and Emulated DOGM and New Color UI are working using HW SPI, and a MKS SPI TFT.

To work with TFT in LPC, I needed a way to use a multi bus SPI, because the TOUCH and TFT are both SPI, with different requirements.

So, I wrote the same SPIClass that already exists in others HALs to LPC, with full support for:

Important: I didn't touch the current SPI methods from LPC. Only the new code is using the new class. To not break anything.

All implemented options can be used at the same instance, just need to call begin/end to change and select the current SPI config.

Done:

  • Multi SPI devices
  • Multi Data Size support - 8 bit and 16 bit
  • 16 bit SPI DMA data send
  • Make TFT SPI configurable by tft miso pin
  • Multi Data Mode support

TODO:

  • Better 16 bit SPI DMA repeat send

Benefits

  • LPC users can now use marlin touch UIs
  • LPC HAL will have a full featured hardware SPI Class

Related Issues

#19017
#18974

This new SPIClass could help #19047 too, as it support changing the spi as needed.

I just send a PR to @p3p , because the framework-arduino-lpc176x needs a 2 line fix to work with DMA 16 bit.
p3p/pio-framework-arduino-lpc176x#43

I would like to ask @p3p and @sjasonsmith to review it this PR. It is the first working version, so I can surely improve it.

@rhapsodyv rhapsodyv changed the title Marlin TFT port to LPC + Bonus: Full SPIClass Marlin TFT port to LPC + Bonus: Full Hardware SPI Support Aug 25, 2020
@thinkyhead thinkyhead merged commit 1a4b82a into MarlinFirmware:bugfix-2.0.x Aug 26, 2020
susisstrolch pushed a commit to susisstrolch/Marlin that referenced this pull request Aug 28, 2020
…K8800-2.0.x

* tag '2.0.6.1' of https://github.com/MarlinFirmware/Marlin: (195 commits)
  Version 2.0.6.1
  [cron] Bump distribution date (2020-08-28)
  Add set_all_homed
  Mark axes not-homed with HOME_AFTER_DEACTIVATE (MarlinFirmware#18907)
  set_axis_not_trusted => set_axis_never_homed
  Independent Neopixel option (MarlinFirmware#19115)
  Fix Creality V4 probe pin
  Fix small typø
  Allocate sufficient MSG_MOVE_Z_DIST buffer
  One MARLIN_DEV_MODE warning per rebuild (MarlinFirmware#19163)
  FYSETC S6 2.0 (MarlinFirmware#19140)
  [cron] Bump distribution date (2020-08-27)
  Fix SINGLENOZZLE fan speed bug (MarlinFirmware#19152)
  Fix NEOPIXEL_STARTUP_TEST last delay (MarlinFirmware#19156)
  TFT (plus Hardware SPI) for LPC (MarlinFirmware#19139)
  Prusa => Průša
  Direct Stepping update (MarlinFirmware#19135)
  Fixes to FTDI Touch UI (MarlinFirmware#19134)
  Add Einsy Rambo Filament Runout Pin (MarlinFirmware#19136)
  Fix SD pins for SKR Pro and GTR (MarlinFirmware#19047)
  ...
albertogg pushed a commit to albertogg/Marlin that referenced this pull request Aug 31, 2020
thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Sep 2, 2020
@rhapsodyv rhapsodyv deleted the lpc-spi-tft branch October 25, 2020 00:30
vgadreau pushed a commit to vgadreau/Marlin that referenced this pull request Dec 9, 2020
kageurufu pushed a commit to CR30-Users/Marlin-CR30 that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants