Bodmer / TJpg_Decoder

Jpeg decoder library based on Tiny JPEG Decompressor
Other
222 stars 42 forks source link

Official RP2040 MBed support? #54

Closed IAmOrion closed 1 year ago

IAmOrion commented 1 year ago

What's the chances this will eventually be able to support the Official RP2040 MBed boards instead of earlephilhower's ?

My project uses USBHID which earlephilhower does not support (Well, there's the confusing Adafruit TinyUSB I just discovered, but that seems messy), but I also want to use images in .h files using this TJpg_Decoder but apparently it doesn't work with the default RP2040 board selection

I'm buggered no matter what ha!

Bodmer commented 1 year ago

The library has worked with the Arduino mbed RP2040 package in the past with the exception that LittleFS, DMA and PIO could not be used. Some examples worked fine. I have not checked for compatibility recently since Phil's package works so well. I have only used keyboard USB HID with Phil's package though.

Bodmer commented 1 year ago

I have updated the library and tested the Flash_Jpg example with TFT_eSPI and the RP2040 Mbed board package 3.4.1. It compiles fine after a few tweaks, see below.

You may also need to comment out lines thus //#include in a sketch because the Mbed package does not seem to provide that header.

Bodmer commented 1 year ago

I have made another change so User_Config.h does not need to be eddited.

IAmOrion commented 1 year ago

Interesting... did you change anything else? I changed the user_config same as here: https://github.com/Bodmer/TJpg_Decoder/commit/41aaa5361a3a3e07730f46f27d13419e008a8a42

I also edited tjpeg_decoder.h to match here: https://github.com/Bodmer/TJpg_Decoder/commit/83d8643395a10189fd338eba49704d661d3830aa

But I still get an error as FS.h being missing

Edit: I just commented out #define TJPGD_LOAD_FFS as noted in the fix changes and it works now