Skip to content

Commit

Permalink
tweak for native build
Browse files Browse the repository at this point in the history
  • Loading branch information
lovyan03 committed Jul 18, 2023
1 parent 4dc24b3 commit 854c0b6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lgfx/v1/LGFX_Sprite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ namespace lgfx

#endif

#elif defined (ESP32) || defined (CONFIG_IDF_TARGET_ESP32) || defined (CONFIG_IDF_TARGET_ESP32S2) || defined (ESP_PLATFORM)
#elif defined (ESP_PLATFORM) || defined(__SAMD51_HARMONY__) || defined(stdin) // ESP-IDF, Harmony, stdio

void createFromBmpFile(const char *path) {
FileWrapper file;
Expand Down
2 changes: 1 addition & 1 deletion src/lgfx/v1/lgfx_filesystem_support.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ namespace lgfx
#endif
#endif

#elif defined (ESP_PLATFORM) || defined(__SAMD51_HARMONY__) || defined(_INC_STDIO) // ESP-IDF or Harmony
#elif defined (ESP_PLATFORM) || defined(__SAMD51_HARMONY__) || defined(stdin) // ESP-IDF, Harmony, stdio

#define LGFX_FUNCTION_GENERATOR(drawImg) \
inline bool drawImg##File(const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left) \
Expand Down
5 changes: 5 additions & 0 deletions src/lgfx/v1/platforms/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,10 @@ Original Source:

#include "arduino_default/Bus_SPI.hpp"

#elif __has_include(<SDL2/SDL.h>) || __has_include(<SDL.h>)

#include "sdl/Bus_I2C.hpp"
#include "sdl/Panel_sdl.hpp"

#endif

2 changes: 1 addition & 1 deletion src/lgfx/v1/platforms/esp32/Bus_SPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace lgfx

class Bus_SPI : public IBus
{
#if !defined (SPI_MOSI_DLEN_REG)
#if defined ( SPI_UPDATE )
static constexpr uint32_t SPI_EXECUTE = SPI_USR | SPI_UPDATE;
#define SPI_MOSI_DLEN_REG(i) (REG_SPI_BASE(i) + 0x1C)
#define SPI_MISO_DLEN_REG(i) (REG_SPI_BASE(i) + 0x1C)
Expand Down

0 comments on commit 854c0b6

Please sign in to comment.