Skip to content

Commit

Permalink
Avoid compile error with Teensy
Browse files Browse the repository at this point in the history
Avoid error when alphaBlend function used in sketch
  • Loading branch information
Bodmer committed Aug 10, 2023
1 parent 1986bd2 commit 3fcadd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions TFT_eSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4973,8 +4973,8 @@ uint16_t TFT_eSPI::decodeUTF8(uint8_t *buf, uint16_t *index, uint16_t remaining)
** Function name: alphaBlend
** Description: Blend 16bit foreground and background
*************************************************************************************x*/
#ifndef STM32
inline
#if !defined (STM32) && !defined(__IMXRT1052__) && !defined(__IMXRT1062__)
inline
#endif
uint16_t TFT_eSPI::alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc)
{
Expand Down
9 changes: 4 additions & 5 deletions TFT_eSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,11 @@ class TFT_eSPI : public Print { friend class TFT_eSprite; // Sprite class has ac
// Alpha blend 2 colours, see generic "alphaBlend_Test" example
// alpha = 0 = 100% background colour
// alpha = 255 = 100% foreground colour
#ifdef STM32
uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc);
#else
inline
uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc);
#if !defined (STM32) && !defined(__IMXRT1052__) && !defined(__IMXRT1062__)
inline
#endif
uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc);

// 16 bit colour alphaBlend with alpha dither (dither reduces colour banding)
uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc, uint8_t dither);
// 24 bit colour alphaBlend with optional alpha dither
Expand Down

0 comments on commit 3fcadd2

Please sign in to comment.