F439_CPP_SPI_RA8875_TFT_LCD_03 1.0
STM32F439 SPI RA8875 7-inch TFT display demo built on the STM32_GFX and STM32_RA8875 libraries
Loading...
Searching...
No Matches
STM32_Arduino_Compat.h File Reference

Minimal Arduino-API compatibility layer for the STM32 port of Adafruit_GFX (and libraries built on it, such as Adafruit_RA8875). More...

#include "main.h"
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Detailed Description

Minimal Arduino-API compatibility layer for the STM32 port of Adafruit_GFX (and libraries built on it, such as Adafruit_RA8875).

The Adafruit graphics libraries are written against the Arduino core. This header supplies the small part of that core they actually use, implemented on the STM32 HAL, so the Adafruit sources can stay as close to upstream as possible:

  • fixed-width types (byte, boolean) and PROGMEM / pgm_read_*() (on STM32 flash is memory mapped, so PROGMEM is a no-op)
  • F() and __FlashStringHelper
  • millis(), delay(), yield()

Include it first; it pulls in "main.h" (the CubeMX-generated header that brings in the HAL for whichever STM32 family the project targets).

Note
Thread safety: everything here is stateless inline code. millis() and delay() are as thread-safe as HAL_GetTick()/HAL_Delay(). Not ISR-safe for delay(): HAL_Delay() busy-waits on the SysTick counter, which never advances if delay() is called from an interrupt of equal or higher priority than SysTick.

Adafruit_GFX and this port: BSD license, see license.txt.

Definition in file STM32_Arduino_Compat.h.