Sync inav to Gitea
Make sure docs are updated / settings_md (push) Canceled after 0s
Build firmware / test (push) Canceled after 0s
Build firmware / build-SITL-Windows (push) Canceled after 0s
Build firmware / build-SITL-Mac (push) Canceled after 0s
Build firmware / build-SITL-Linux (push) Canceled after 0s
Build firmware / build-SITL-Linux-arm64 (push) Canceled after 0s
Build firmware / upload-artifacts (push) Canceled after 0s
Build firmware / build-single-target (push) Canceled after 0s
Build firmware / build (9) (push) Canceled after 0s
Build firmware / build (8) (push) Canceled after 0s
Build firmware / build (7) (push) Canceled after 0s
Build firmware / build (6) (push) Canceled after 0s
Build firmware / build (5) (push) Canceled after 0s
Build firmware / build (4) (push) Canceled after 0s
Build firmware / build (3) (push) Canceled after 0s
Build firmware / build (2) (push) Canceled after 0s
Build firmware / build (14) (push) Canceled after 0s
Build firmware / build (13) (push) Canceled after 0s
Build firmware / build (12) (push) Canceled after 0s
Build firmware / build (11) (push) Canceled after 0s
Build firmware / build (10) (push) Canceled after 0s
Build firmware / build (1) (push) Canceled after 0s
Build firmware / build (0) (push) Canceled after 0s
Build firmware / detect (push) Canceled after 0s
Build pre-release / build (push) Canceled after 0s
Build pre-release / Release (push) Canceled after 0s

This commit is contained in:
2026-08-03 16:37:40 +08:00
commit dac37fd077
14095 changed files with 5603119 additions and 0 deletions
@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Release Notes for EXC7200 Component Driver</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="_htmresc/mini-st.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<div class="row">
<div class="col-sm-12 col-lg-4">
<div class="card fluid">
<div class="sectione dark">
<center>
<h1 id="release-notes-for-exc7200-component-driver"><strong>Release Notes for EXC7200 Component Driver</strong></h1>
<p>Copyright © 2015 STMicroelectronics<br />
</p>
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo.png" alt="ST logo" /></a>
</center>
</div>
</div>
<h1 id="license">License</h1>
This software component is licensed by ST under BSD 3-Clause license, the “License”; You may not use this component except in compliance with the License. You may obtain a copy of the License at:
<center>
<a href="https://opensource.org/licenses/BSD-3-Clause">https://opensource.org/licenses/BSD-3-Clause</a>
</center>
<h1 id="purpose">Purpose</h1>
<p>This driver provides a set of audio functions offered by EXC7200 TS component</p>
</div>
<div class="col-sm-12 col-lg-8">
<h1 id="update-history">Update History</h1>
<div class="collapse">
<input type="checkbox" id="collapse-section5" checked aria-hidden="true"> <label for="collapse-section5" aria-hidden="true"><strong>V2.0.1 / 23-November-2019</strong></label>
<div>
<h2 id="main-changes">Main Changes</h2>
<ul>
<li>Update st_logo.png inclusion path in Release notes</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section4" checked aria-hidden="true"> <label for="collapse-section4" aria-hidden="true"><strong>V2.0.0 / 14-October-2019</strong></label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<ul>
<li>First Official release of EXC7200 BSP drivers in line with STM32Cube BSP drivers development guidelines (UM2298)</li>
<li>The component drivers are composed of
<ul>
<li>component core drivers files: exc7200.h/.c</li>
<li>component register drivers files: exc7200_reg.h/.c</li>
<li>component configuration files: exc7200_conf_template.h</li>
</ul></li>
</ul>
<h2 id="backward-compatibility">Backward Compatibility</h2>
<ul>
<li>This version breaks the compatibility with previous versions</li>
</ul>
<h2 id="dependencies">Dependencies</h2>
<ul>
<li><p>This software release is compatible with:</p>
<ul>
<li>BSP Common v6.0.1 or above</li>
</ul></li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section3" checked aria-hidden="true"> <label for="collapse-section3" aria-hidden="true"><strong>V1.0.2 / 07-April-2017</strong></label>
<div>
<h2 id="main-changes-2">Main Changes</h2>
<ul>
<li>Update comments to be used for PDSC generation</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section2" checked aria-hidden="true"> <label for="collapse-section2" aria-hidden="true"><strong>V1.0.1 / 21-September-2015</strong></label>
<div>
<h2 id="main-changes-3">Main Changes</h2>
<ul>
<li>exc7200.c:
<ul>
<li>Update the I2C slave read address within exc7200_TS_DetectTouch() function.</li>
<li>Update exc7200_TS_GetXY() function to return correct Touch Screen positions.</li>
</ul></li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section1" checked aria-hidden="true"> <label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 / 28-April-2015</strong></label>
<div>
<h2 id="main-changes-4">Main Changes</h2>
<ul>
<li>First official release of <strong>EXC7200</strong> Toush Screen Component drivers</li>
</ul>
</div>
</div>
</div>
</div>
<footer class="sticky">
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <span style="font-color: blue;"><a href="http://www.st.com/STM32">www.st.com</a></span>
</footer>
</body>
</html>
@@ -0,0 +1,119 @@
---
pagetitle: Release Notes for EXC7200 Component Driver
lang: en
---
::: {.row}
::: {.col-sm-12 .col-lg-4}
::: {.card .fluid}
::: {.sectione .dark}
<center>
# **Release Notes for EXC7200 Component Driver**
Copyright &copy; 2015 STMicroelectronics\
[![ST logo](_htmresc/st_logo.png)](https://www.st.com){.logo}
</center>
:::
:::
# License
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this component except in
compliance with the License. You may obtain a copy of the License at:
<center>
[https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
</center>
# Purpose
This driver provides a set of audio functions offered by EXC7200 TS component
:::
::: {.col-sm-12 .col-lg-8}
# Update History
::: {.collapse}
<input type="checkbox" id="collapse-section5" checked aria-hidden="true">
<label for="collapse-section5" aria-hidden="true">__V2.0.1 / 23-November-2019__</label>
<div>
## Main Changes
- Update st_logo.png inclusion path in Release notes
</div>
:::
::: {.collapse}
<input type="checkbox" id="collapse-section4" checked aria-hidden="true">
<label for="collapse-section4" aria-hidden="true">__V2.0.0 / 14-October-2019__</label>
<div>
## Main Changes
- First Official release of EXC7200 BSP drivers in line with STM32Cube BSP drivers development guidelines (UM2298)
- The component drivers are composed of
- component core drivers files: exc7200.h/.c
- component register drivers files: exc7200_reg.h/.c
- component configuration files: exc7200_conf_template.h
## Backward Compatibility
- This version breaks the compatibility with previous versions
## Dependencies
- This software release is compatible with:
- BSP Common v6.0.1 or above
</div>
:::
::: {.collapse}
<input type="checkbox" id="collapse-section3" checked aria-hidden="true">
<label for="collapse-section3" aria-hidden="true">__V1.0.2 / 07-April-2017__</label>
<div>
## Main Changes
- Update comments to be used for PDSC generation
</div>
:::
::: {.collapse}
<input type="checkbox" id="collapse-section2" checked aria-hidden="true">
<label for="collapse-section2" aria-hidden="true">__V1.0.1 / 21-September-2015__</label>
<div>
## Main Changes
- exc7200.c:
- Update the I2C slave read address within exc7200_TS_DetectTouch() function.
- Update exc7200_TS_GetXY() function to return correct Touch Screen positions.
</div>
:::
::: {.collapse}
<input type="checkbox" id="collapse-section1" checked aria-hidden="true">
<label for="collapse-section1" aria-hidden="true">__V1.0.0 / 28-April-2015__</label>
<div>
## Main Changes
- First official release of **EXC7200** Toush Screen Component drivers
</div>
:::
:::
:::
<footer class="sticky">
For complete documentation on <mark>STM32 Microcontrollers</mark> ,
visit: [[www.st.com](http://www.st.com/STM32)]{style="font-color: blue;"}
</footer>
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -0,0 +1,408 @@
/**
******************************************************************************
* @file exc7200.c
* @author MCD Application Team
* @brief This file provides a set of functions needed to manage the EXC7200
* IO Expander devices.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "exc7200.h"
/** @addtogroup BSP
* @{
*/
/** @addtogroup Component
* @{
*/
/** @defgroup EXC7200 EXC7200
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/** @defgroup EXC7200_Exported_Variables EXC7200 Exported Variables
* @{
*/
/* Touch screen driver structure initialization */
EXC7200_TS_Drv_t EXC7200_TS_Driver =
{
EXC7200_Init,
EXC7200_DeInit,
EXC7200_GestureConfig,
EXC7200_ReadID,
EXC7200_GetState,
EXC7200_GetMultiTouchState,
EXC7200_GetGesture,
EXC7200_GetCapabilities,
EXC7200_EnableIT,
EXC7200_DisableIT,
EXC7200_ClearIT,
EXC7200_ITStatus
};
/**
* @}
*/
/** @defgroup EXC7200_Private_Function_Prototypes EXC7200 Private Function Prototypes
* @{
*/
static int32_t EXC7200_DetectTouch(EXC7200_Object_t *pObj, uint8_t *pData, uint32_t Length);
static int32_t ReadRegWrap(void *handle, uint8_t Reg, uint8_t* Data, uint16_t Length);
static int32_t WriteRegWrap(void *handle, uint8_t Reg, uint8_t* Data, uint16_t Length);
/**
* @}
*/
/** @defgroup EXC7200_Exported_Functions EXC7200 Exported Functions
* @{
*/
/**
* @brief Register IO bus to component object
* @param Component object pointer
* @retval error status
*/
int32_t EXC7200_RegisterBusIO (EXC7200_Object_t *pObj, EXC7200_IO_t *pIO)
{
int32_t ret;
if (pObj == NULL)
{
ret = EXC7200_ERROR;
}
else
{
pObj->IO.Init = pIO->Init;
pObj->IO.DeInit = pIO->DeInit;
pObj->IO.Address = pIO->Address;
pObj->IO.WriteReg = pIO->WriteReg;
pObj->IO.ReadReg = pIO->ReadReg;
pObj->IO.GetTick = pIO->GetTick;
pObj->Ctx.ReadReg = ReadRegWrap;
pObj->Ctx.WriteReg = WriteRegWrap;
pObj->Ctx.handle = pObj;
if(pObj->IO.Init != NULL)
{
ret = pObj->IO.Init();
}
else
{
ret = EXC7200_ERROR;
}
}
return ret;
}
/**
* @brief Get EXC7200 sensor capabilities
* @param pObj Component object pointer
* @param Capabilities pointer to EXC7200 sensor capabilities
* @retval Component status
*/
int32_t EXC7200_GetCapabilities(EXC7200_Object_t *pObj, EXC7200_Capabilities_t *Capabilities)
{
/* Prevent unused argument(s) compilation warning */
(void)(pObj);
/* Store component's capabilities */
Capabilities->MultiTouch = 0;
Capabilities->Gesture = 0;
Capabilities->MaxTouch = EXC7200_MAX_NB_TOUCH;
Capabilities->MaxXl = EXC7200_MAX_X_LENGTH;
Capabilities->MaxYl = EXC7200_MAX_Y_LENGTH;
return EXC7200_OK;
}
/**
* @brief Initialize the EXC7200 communication bus
* from MCU to EXC7200 : ie I2C channel initialization (if required).
* @param pObj Component object pointer
* @retval Component status
*/
int32_t EXC7200_Init(EXC7200_Object_t *pObj)
{
int32_t ret = EXC7200_OK;
if(pObj->IsInitialized == 0U)
{
/* Initialize IO BUS layer */
if(pObj->IO.Init() != EXC7200_OK)
{
ret = EXC7200_ERROR;
}
else
{
pObj->IsInitialized = 1;
}
}
return ret;
}
/**
* @brief De-Initialize the EXC7200 communication bus
* from MCU to EXC7200 : ie I2C channel initialization (if required).
* @param pObj Component object pointer
* @retval Component status
*/
int32_t EXC7200_DeInit(EXC7200_Object_t *pObj)
{
int32_t ret = EXC7200_OK;
if(pObj->IsInitialized == 1U)
{
if(pObj->IO.DeInit() != EXC7200_OK)
{
ret = EXC7200_ERROR;
}
else
{
pObj->IsInitialized = 0;
}
}
return ret;
}
/**
* @brief Configure the EXC7200 gesture
* from MCU to EXC7200 : ie I2C channel initialization (if required).
* @param pObj Component object pointer
* @param GestureInit Gesture init structure
* @retval Component status
*/
int32_t EXC7200_GestureConfig(EXC7200_Object_t *pObj, EXC7200_Gesture_Init_t *GestureInit)
{
/* Feature not supported */
return EXC7200_ERROR;
}
/**
* @brief Read the EXC7200 device ID, pre initialize I2C in case of need to be
* able to read the EXC7200 device ID, and verify this is a EXC7200.
* @param pObj Component object pointer
* @param Id Pointer to component ID value
* @retval Component status
*/
int32_t EXC7200_ReadID(EXC7200_Object_t *pObj, uint32_t *Id)
{
int32_t ret = EXC7200_ERROR;
uint8_t data;
if(exc7200_read_reg(&pObj->Ctx, EXC7200_READ_REG, &data, 1) == EXC7200_OK)
{
*Id = EXC7200_ID;
ret = EXC7200_OK;
}
return ret;
}
/**
* @brief Get the touch screen X and Y positions values
* @param pObj Component object pointer
* @param State Single Touch stucture pointer
* @retval Component status.
*/
int32_t EXC7200_GetState(EXC7200_Object_t *pObj, EXC7200_State_t *State)
{
uint8_t data[10];
State->TouchDetected = (uint32_t)EXC7200_DetectTouch(pObj, data, (uint32_t)sizeof(data));
/* Send back first ready X position to caller */
State->TouchX = (((data[3]&0x00ff) << 4) | ((data[2]&0x00f0) >> 4)) << 1;
/* Send back first ready Y position to caller */
State->TouchY = (((data[5]&0x00ff) << 4) | ((data[4]&0x00f0) >> 4)) << 1;
/* Dummy Read to deactivate read mode */
(void)EXC7200_DetectTouch(pObj, data, (uint32_t)sizeof(data));
return EXC7200_OK;
}
/**
* @brief Get the touch screen Xn and Yn positions values in multi-touch mode
* @param pObj Component object pointer
* @param State Multi Touch stucture pointer
* @retval Component status.
*/
int32_t EXC7200_GetMultiTouchState(EXC7200_Object_t *pObj, EXC7200_MultiTouch_State_t *State)
{
/* Feature not supported */
return EXC7200_ERROR;
}
/**
* @brief Get Gesture ID
* @param pObj Component object pointer
* @param GestureId gesture ID
* @retval Component status.
*/
int32_t EXC7200_GetGesture(EXC7200_Object_t *pObj, uint8_t *GestureId)
{
/* Feature not supported */
return EXC7200_ERROR;
}
/**
* @brief Configure the EXC7200 device to generate IT on given INT pin
* connected to MCU as EXTI.
* @param pObj Component object pointer
* @retval Component status.
*/
int32_t EXC7200_EnableIT(EXC7200_Object_t *pObj)
{
/* Feature not supported */
return EXC7200_ERROR;
}
/**
* @brief Configure the EXC7200 device to stop generating IT on the given INT pin
* connected to MCU as EXTI.
* @param pObj Component object pointer
* @retval Component status.
*/
int32_t EXC7200_DisableIT(EXC7200_Object_t *pObj)
{
/* Feature not supported */
return EXC7200_ERROR;
}
/**
* @brief Get IT status from EXC7200 interrupt status registers
* Should be called Following an EXTI coming to the MCU to know the detailed
* reason of the interrupt.
* @note : This feature is not applicable to EXC7200.
* @param pObj Component object pointer
* @retval Component status.
*/
int32_t EXC7200_ITStatus(EXC7200_Object_t *pObj)
{
/* Feature not supported */
return EXC7200_ERROR;
}
/**
* @brief Clear IT status in EXC7200 interrupt status clear registers
* Should be called Following an EXTI coming to the MCU.
* @note : This feature is not applicable to EXC7200.
* @param pObj Component object pointer
* @retval Component status.
*/
int32_t EXC7200_ClearIT(EXC7200_Object_t *pObj)
{
/* Feature not supported */
return EXC7200_ERROR;
}
/**
* @}
*/
/** @defgroup EXC7200_Private_Functions EXC7200 Private Functions
* @{
*/
/**
* @brief Return if there is touches detected or not.
* Get the touch screen X and Y positions values
* @param pObj Component object pointer
* @param pData Pointer to data buffer
* @param Length Number of data to read
* @retval Number of active touches detected (can be 0 or 1) or EXC7200_ERROR
* in case of error
*/
static int32_t EXC7200_DetectTouch(EXC7200_Object_t *pObj, uint8_t *pData, uint32_t Length)
{
int32_t ret;
/* Read TS data */
if(exc7200_read_reg(&pObj->Ctx, EXC7200_READ_REG, pData, Length) != EXC7200_OK)
{
ret = EXC7200_ERROR;
}
else
{
if(pData[1] == 0x83U)
{
/* Touch detected */
ret = 1;
}
else
{
/* If invalid number of touch detected, set it to zero */
ret = 0;
}
}
return ret;
}
/**
* @brief Wrap IO bus read function to component register red function
* @param handle Component object handle
* @param Reg The target register address to read
* @param pData The target register value to be read
* @param Length buffer size to be read
* @retval Component status.
*/
static int32_t ReadRegWrap(void *handle, uint8_t Reg, uint8_t* pData, uint16_t Length)
{
EXC7200_Object_t *pObj = (EXC7200_Object_t *)handle;
return pObj->IO.ReadReg(pObj->IO.Address, Reg, pData, Length);
}
/**
* @brief Wrap IO bus write function to component register write function
* @param handle Component object handle
* @param Reg The target register address to write
* @param pData The target register value to be written
* @param Length buffer size to be written
* @retval Component status.
*/
static int32_t WriteRegWrap(void *handle, uint8_t Reg, uint8_t* pData, uint16_t Length)
{
EXC7200_Object_t *pObj = (EXC7200_Object_t *)handle;
return pObj->IO.WriteReg(pObj->IO.Address, Reg, pData, Length);
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
@@ -0,0 +1,191 @@
/**
******************************************************************************
* @file exc7200.h
* @author MCD Application Team
* @brief This file contains all the functions prototypes for the
* exc7200.c IO expander driver.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef EXC7200_H
#define EXC7200_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "exc7200_reg.h"
#include <stddef.h>
#include "exc7200_conf.h"
/* Macros --------------------------------------------------------------------*/
/** @addtogroup BSP
* @{
*/
/** @addtogroup Component
* @{
*/
/** @addtogroup EXC7200
* @{
*/
/** @addtogroup EXC7200_Exported_Constants
* @{
*/
#define EXC7200_OK (0)
#define EXC7200_ERROR (-1)
/* Max detectable simultaneous touches */
#define EXC7200_MAX_NB_TOUCH 1U
/* Touch EXC7200 IDs */
#define EXC7200_ID 0x7200U
/**
* @}
*/
/** @defgroup EXC7200_Exported_Types EXC7200 Exported Types
* @{
*/
typedef struct
{
uint32_t Radian;
uint32_t OffsetLeftRight;
uint32_t OffsetUpDown;
uint32_t DistanceLeftRight;
uint32_t DistanceUpDown;
uint32_t DistanceZoom;
}EXC7200_Gesture_Init_t;
typedef int32_t (*EXC7200_Init_Func) (void);
typedef int32_t (*EXC7200_DeInit_Func) (void);
typedef int32_t (*EXC7200_GetTick_Func) (void);
typedef int32_t (*EXC7200_Delay_Func) (uint32_t);
typedef int32_t (*EXC7200_WriteReg_Func)(uint16_t, uint16_t, uint8_t*, uint16_t);
typedef int32_t (*EXC7200_ReadReg_Func) (uint16_t, uint16_t, uint8_t*, uint16_t);
typedef struct
{
EXC7200_Init_Func Init;
EXC7200_DeInit_Func DeInit;
uint16_t Address;
EXC7200_WriteReg_Func WriteReg;
EXC7200_ReadReg_Func ReadReg;
EXC7200_GetTick_Func GetTick;
} EXC7200_IO_t;
typedef struct
{
uint32_t TouchDetected;
uint32_t TouchX;
uint32_t TouchY;
} EXC7200_State_t;
typedef struct
{
uint32_t TouchDetected;
uint32_t TouchX[EXC7200_MAX_NB_TOUCH];
uint32_t TouchY[EXC7200_MAX_NB_TOUCH];
uint32_t TouchWeight[EXC7200_MAX_NB_TOUCH];
uint32_t TouchEvent[EXC7200_MAX_NB_TOUCH];
uint32_t TouchArea[EXC7200_MAX_NB_TOUCH];
} EXC7200_MultiTouch_State_t;
typedef struct
{
EXC7200_IO_t IO;
exc7200_ctx_t Ctx;
uint8_t IsInitialized;
} EXC7200_Object_t;
typedef struct
{
uint8_t MultiTouch;
uint8_t Gesture;
uint8_t MaxTouch;
uint32_t MaxXl;
uint32_t MaxYl;
} EXC7200_Capabilities_t;
typedef struct
{
int32_t ( *Init ) ( EXC7200_Object_t *);
int32_t ( *DeInit ) ( EXC7200_Object_t * );
int32_t ( *GestureConfig ) ( EXC7200_Object_t *, EXC7200_Gesture_Init_t* );
int32_t ( *ReadID ) ( EXC7200_Object_t *, uint32_t * );
int32_t ( *GetState ) ( EXC7200_Object_t *, EXC7200_State_t* );
int32_t ( *GetMultiTouchState ) ( EXC7200_Object_t *, EXC7200_MultiTouch_State_t* );
int32_t ( *GetGesture ) ( EXC7200_Object_t *, uint8_t* );
int32_t ( *GetCapabilities ) ( EXC7200_Object_t *, EXC7200_Capabilities_t * );
int32_t ( *EnableIT ) ( EXC7200_Object_t * );
int32_t ( *DisableIT ) ( EXC7200_Object_t * );
int32_t ( *ClearIT ) ( EXC7200_Object_t * );
int32_t ( *ITStatus ) ( EXC7200_Object_t * );
} EXC7200_TS_Drv_t;
/**
* @}
*/
/** @addtogroup EXC7200_Exported_Variables
* @{
*/
extern EXC7200_TS_Drv_t EXC7200_TS_Driver;
/**
* @}
*/
/** @addtogroup EXC7200_Exported_Functions
* @{
*/
int32_t EXC7200_RegisterBusIO (EXC7200_Object_t *pObj, EXC7200_IO_t *pIO);
int32_t EXC7200_Init(EXC7200_Object_t *pObj);
int32_t EXC7200_DeInit(EXC7200_Object_t *pObj);
int32_t EXC7200_GestureConfig(EXC7200_Object_t *pObj, EXC7200_Gesture_Init_t *GestureInit);
int32_t EXC7200_ReadID(EXC7200_Object_t *pObj, uint32_t *Id);
int32_t EXC7200_GetState(EXC7200_Object_t *pObj, EXC7200_State_t *State);
int32_t EXC7200_GetMultiTouchState(EXC7200_Object_t *pObj, EXC7200_MultiTouch_State_t *State);
int32_t EXC7200_GetGesture(EXC7200_Object_t *pObj, uint8_t *GestureId);
int32_t EXC7200_EnableIT(EXC7200_Object_t *pObj);
int32_t EXC7200_DisableIT(EXC7200_Object_t *pObj);
int32_t EXC7200_ITStatus(EXC7200_Object_t *pObj);
int32_t EXC7200_ClearIT(EXC7200_Object_t *pObj);
int32_t EXC7200_GetCapabilities(EXC7200_Object_t *pObj, EXC7200_Capabilities_t *Capabilities);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* EXC7200_H */
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
@@ -0,0 +1,41 @@
/**
******************************************************************************
* @file exc7200_conf_template.h
* @author MCD Application Team
* @brief This file contains specific configuration for the
* exc7200.c that can be modified by user.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef EXC7200_CONF_H
#define EXC7200_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Macros --------------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define EXC7200_MAX_X_LENGTH 4096U
#define EXC7200_MAX_Y_LENGTH 4096U
#ifdef __cplusplus
}
#endif
#endif /* EXC7200_CONF_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
@@ -0,0 +1,82 @@
/**
******************************************************************************
* @file exc7200_reg.c
* @author MCD Application Team
* @brief This file provides unitary register function to control the exc7200 Touch
*
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "exc7200_reg.h"
/** @addtogroup BSP
* @{
*/
/** @addtogroup Component
* @{
*/
/** @addtogroup EXC7200
* @{
*/
/** @addtogroup EXC7200_Exported_Functions
* @{
*/
/**
* @brief Read EXC7200 component registers
* @param ctx component contex
* @param reg Register to read from
* @param pdata Pointer to data buffer
* @param length Number of data to read
* @retval Component status
*/
int32_t exc7200_read_reg(exc7200_ctx_t *ctx, uint8_t reg, uint8_t* pdata, uint16_t length)
{
return ctx->ReadReg(ctx->handle, reg, pdata, length);
}
/**
* @brief Write EXC7200 component registers
* @param ctx component contex
* @param reg Register to write to
* @param pdata Pointer to data buffer
* @param length Number of data to write
* @retval Component status
*/
int32_t exc7200_write_reg(exc7200_ctx_t *ctx, uint8_t reg, uint8_t *pdata, uint16_t length)
{
return ctx->WriteReg(ctx->handle, reg, pdata, length);
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
@@ -0,0 +1,99 @@
/**
******************************************************************************
* @file exc7200_reg.h
* @author MCD Application Team
* @brief Header of exc7200_regs.c
*
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef EXC7200_REG_H
#define EXC7200_REG_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Macros --------------------------------------------------------------------*/
/** @addtogroup BSP
* @{
*/
/** @addtogroup Component
* @{
*/
/** @addtogroup EXC7200
* @{
*/
/** @defgroup EXC7200_Exported_Constants Exported Constants
* @{
*/
/* */
#define EXC7200_READ_REG 0x09U
/**
* @}
*/
/** @defgroup EXC7200_Exported_Types EXC7200 Exported Types
* @{
*/
typedef int32_t (*EXC7200_Write_Func)(void *, uint8_t, uint8_t*, uint16_t);
typedef int32_t (*EXC7200_Read_Func) (void *, uint8_t, uint8_t*, uint16_t);
typedef struct
{
EXC7200_Write_Func WriteReg;
EXC7200_Read_Func ReadReg;
void *handle;
} exc7200_ctx_t;
/**
* @}
*/
/** @addtogroup EXC7200_Exported_Functions
* @{
*/
int32_t exc7200_write_reg(exc7200_ctx_t *ctx, uint8_t reg, uint8_t *pbuf, uint16_t length);
int32_t exc7200_read_reg(exc7200_ctx_t *ctx, uint8_t reg, uint8_t *pbuf, uint16_t length);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* EXC7200_REG_H */
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/