Ajout desc

This commit is contained in:
Serge NOEL
2026-02-13 09:28:40 +01:00
parent 758f73bc0e
commit d78e04366f
13 changed files with 619 additions and 44 deletions

View File

@@ -1,5 +1,69 @@
/**
* @file XPT2046.ino
* @brief XPT2046 SPI/Bitbang touchscreen interface for PacoMouseCYD throttle.
* @author F. Cañada
* @date 2025-2026
* @copyright https://usuaris.tinet.cat/fmco/
*
* This file contains the implementation of the XPT2046 touchscreen interface,
* including initialization, calibration, and touch detection for the PacoMouseCYD throttle.
*/
////////////////////////////////////////////////////////////
// API Documentation
////////////////////////////////////////////////////////////
/**
* @brief XPT2046 touchscreen class constructor.
* @param mosiPin MOSI pin number.
* @param misoPin MISO pin number.
* @param clkPin Clock pin number.
* @param csPin Chip select pin number.
*/
XPT2046_TS::XPT2046_TS(uint8_t mosiPin, uint8_t misoPin, uint8_t clkPin, uint8_t csPin);
/**
* @brief Initializes the touchscreen with given width and height.
* @param width Screen width.
* @param height Screen height.
*/
void XPT2046_TS::begin(uint16_t width, uint16_t height);
/**
* @brief Sets the touchscreen calibration values.
* @param xMin Minimum X value.
* @param xMax Maximum X value.
* @param yMin Minimum Y value.
* @param yMax Maximum Y value.
*/
void XPT2046_TS::setCalibration(uint16_t xMin, uint16_t xMax, uint16_t yMin, uint16_t yMax);
/**
* @brief Gets the current touchscreen calibration values.
* @return The current TouchCalibration struct.
*/
TouchCalibration XPT2046_TS::getCalibration();
/**
* @brief Sets the touchscreen rotation.
* @param n Rotation value (0-3).
*/
void XPT2046_TS::setRotation(uint8_t n);
/**
* @brief Checks if the touchscreen is currently being touched.
* @return True if touched, false otherwise.
*/
bool XPT2046_TS::touched();
// Add further function documentation here as needed for each public function.
////////////////////////////////////////////////////////////
// End API Documentation
////////////////////////////////////////////////////////////
/* PacoMouseCYD throttle -- F. Cañada 2025-2026 -- https://usuaris.tinet.cat/fmco/
Simple XPT2046 SPI/Bitbang interface for PacoMouseCYD
Simple XPT2046 SPI/Bitbang interface for PacoMouseCYD
*/
#include "config.h"