STM32L486xx HAL User Manual
|
This file provides firmware functions to manage the following functionalities of the Touch Sensing Controller (TSC) peripheral: + Initialization and De-initialization + Channel IOs, Shield IOs and Sampling IOs configuration + Start and Stop an acquisition + Read acquisition result + Interrupts and flags management. More...
#include "stm32l4xx_hal.h"
Go to the source code of this file.
Functions | |
static uint32_t | TSC_extract_groups (uint32_t iomask) |
Utility function used to set the acquired groups mask. | |
HAL_StatusTypeDef | HAL_TSC_Init (TSC_HandleTypeDef *htsc) |
Initialize the TSC peripheral according to the specified parameters in the TSC_InitTypeDef structure and initialize the associated handle. | |
HAL_StatusTypeDef | HAL_TSC_DeInit (TSC_HandleTypeDef *htsc) |
Deinitialize the TSC peripheral registers to their default reset values. | |
__weak void | HAL_TSC_MspInit (TSC_HandleTypeDef *htsc) |
Initialize the TSC MSP. | |
__weak void | HAL_TSC_MspDeInit (TSC_HandleTypeDef *htsc) |
DeInitialize the TSC MSP. | |
HAL_StatusTypeDef | HAL_TSC_RegisterCallback (TSC_HandleTypeDef *htsc, HAL_TSC_CallbackIDTypeDef CallbackID, pTSC_CallbackTypeDef pCallback) |
Register a User TSC Callback To be used instead of the weak predefined callback. | |
HAL_StatusTypeDef | HAL_TSC_UnRegisterCallback (TSC_HandleTypeDef *htsc, HAL_TSC_CallbackIDTypeDef CallbackID) |
Unregister an TSC Callback TSC callback is redirected to the weak predefined callback. | |
HAL_StatusTypeDef | HAL_TSC_Start (TSC_HandleTypeDef *htsc) |
Start the acquisition. | |
HAL_StatusTypeDef | HAL_TSC_Start_IT (TSC_HandleTypeDef *htsc) |
Start the acquisition in interrupt mode. | |
HAL_StatusTypeDef | HAL_TSC_Stop (TSC_HandleTypeDef *htsc) |
Stop the acquisition previously launched in polling mode. | |
HAL_StatusTypeDef | HAL_TSC_Stop_IT (TSC_HandleTypeDef *htsc) |
Stop the acquisition previously launched in interrupt mode. | |
HAL_StatusTypeDef | HAL_TSC_PollForAcquisition (TSC_HandleTypeDef *htsc) |
Start acquisition and wait until completion. | |
TSC_GroupStatusTypeDef | HAL_TSC_GroupGetStatus (TSC_HandleTypeDef *htsc, uint32_t gx_index) |
Get the acquisition status for a group. | |
uint32_t | HAL_TSC_GroupGetValue (TSC_HandleTypeDef *htsc, uint32_t gx_index) |
Get the acquisition measure for a group. | |
HAL_StatusTypeDef | HAL_TSC_IOConfig (TSC_HandleTypeDef *htsc, TSC_IOConfigTypeDef *config) |
Configure TSC IOs. | |
HAL_StatusTypeDef | HAL_TSC_IODischarge (TSC_HandleTypeDef *htsc, uint32_t choice) |
Discharge TSC IOs. | |
HAL_TSC_StateTypeDef | HAL_TSC_GetState (TSC_HandleTypeDef *htsc) |
Return the TSC handle state. | |
void | HAL_TSC_IRQHandler (TSC_HandleTypeDef *htsc) |
Handle TSC interrupt request. | |
__weak void | HAL_TSC_ConvCpltCallback (TSC_HandleTypeDef *htsc) |
Acquisition completed callback in non-blocking mode. | |
__weak void | HAL_TSC_ErrorCallback (TSC_HandleTypeDef *htsc) |
Error callback in non-blocking mode. |
This file provides firmware functions to manage the following functionalities of the Touch Sensing Controller (TSC) peripheral: + Initialization and De-initialization + Channel IOs, Shield IOs and Sampling IOs configuration + Start and Stop an acquisition + Read acquisition result + Interrupts and flags management.
Table 1. IOs for the STM32L4xx devices +--------------------------------+ | IOs | TSC functions | |--------------|-----------------| | PB12 (AF) | TSC_G1_IO1 | | PB13 (AF) | TSC_G1_IO2 | | PB14 (AF) | TSC_G1_IO3 | | PB15 (AF) | TSC_G1_IO4 | |--------------|-----------------| | PB4 (AF) | TSC_G2_IO1 | | PB5 (AF) | TSC_G2_IO2 | | PB6 (AF) | TSC_G2_IO3 | | PB7 (AF) | TSC_G2_IO4 | |--------------|-----------------| | PA15 (AF) | TSC_G3_IO1 | | PC10 (AF) | TSC_G3_IO2 | | PC11 (AF) | TSC_G3_IO3 | | PC12 (AF) | TSC_G3_IO4 | |--------------|-----------------| | PC6 (AF) | TSC_G4_IO1 | | PC7 (AF) | TSC_G4_IO2 | | PC8 (AF) | TSC_G4_IO3 | | PC9 (AF) | TSC_G4_IO4 | |--------------|-----------------| | PE10 (AF) | TSC_G5_IO1 | | PE11 (AF) | TSC_G5_IO2 | | PE12 (AF) | TSC_G5_IO3 | | PE13 (AF) | TSC_G5_IO4 | |--------------|-----------------| | PD10 (AF) | TSC_G6_IO1 | | PD11 (AF) | TSC_G6_IO2 | | PD12 (AF) | TSC_G6_IO3 | | PD13 (AF) | TSC_G6_IO4 | |--------------|-----------------| | PE2 (AF) | TSC_G7_IO1 | | PE3 (AF) | TSC_G7_IO2 | | PE4 (AF) | TSC_G7_IO3 | | PE5 (AF) | TSC_G7_IO4 | |--------------|-----------------| | PF14 (AF) | TSC_G8_IO1 | | PF15 (AF) | TSC_G8_IO2 | | PG0 (AF) | TSC_G8_IO3 | | PG1 (AF) | TSC_G8_IO4 | |--------------|-----------------| | PB10 (AF) | TSC_SYNC | | PD2 (AF) | | +--------------------------------+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32l4xx_hal_tsc.c.