F439_CPP_SPI_RA8875_TFT_LCD_04 1.0
STM32F439 SPI RA8875 7-inch TFT display with FRAM-backed touch calibration, built on the STM32_GFX, STM32_RA8875 and STM32_MB85RS64V libraries
Loading...
Searching...
No Matches
touchCalibrationStorage.hpp
Go to the documentation of this file.
1
32#ifndef INC_TOUCHCALIBRATIONSTORAGE_HPP_
33#define INC_TOUCHCALIBRATIONSTORAGE_HPP_
34
35#include "Adafruit_RA8875.h"
36#include "MB85RS64V.hpp"
37
39constexpr uint16_t TOUCH_CAL_ADDRESS = 0x0100;
40
42constexpr uint16_t TOUCH_CAL_HEADER_ADDRESS = 0x0120;
43
45
46bool touchCalibrationLoad(Adafruit_RA8875 *display, MB85RS64V *fram, tsMatrix_t *matrix);
47
48bool touchCalibrationSave(Adafruit_RA8875 *display, MB85RS64V *fram, tsMatrix_t *matrix);
49
50#endif /* INC_TOUCHCALIBRATIONSTORAGE_HPP_ */
Class that stores state and functions for interacting with the RA8875 display controller.
Driver for one MB85RS64V SPI FRAM (8192 bytes) on an STM32 HAL SPI bus.
Definition MB85RS64V.hpp:78
bool touchCalibrationSave(Adafruit_RA8875 *display, MB85RS64V *fram, tsMatrix_t *matrix)
Saves the calibration matrix to the FRAM and checks it by reading it back.
bool touchCalibrationLoad(Adafruit_RA8875 *display, MB85RS64V *fram, tsMatrix_t *matrix)
Loads the calibration matrix from the FRAM if a valid one is stored.
constexpr uint16_t TOUCH_CAL_ADDRESS
FRAM address of the calibration matrix block written by the RA8875 library.
void touchCalibrationAttachStorage(Adafruit_RA8875 *display, MB85RS64V *fram)
Registers the FRAM read and write callbacks with the display library.
constexpr uint16_t TOUCH_CAL_HEADER_ADDRESS
FRAM address of the 12-byte validity header.