-
Notifications
You must be signed in to change notification settings - Fork 4
/
cy_capsense_control.h
135 lines (105 loc) · 5.09 KB
/
cy_capsense_control.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/***************************************************************************//**
* \file cy_capsense_control.h
* \version 5.0
*
* \brief
* This file provides the function prototypes of the Control module.
*
********************************************************************************
* \copyright
* Copyright 2018-2024, Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
* You may use this file only in accordance with the license, terms, conditions,
* disclaimers, and limitations in the end user license agreement accompanying
* the software package with which this file was provided.
*******************************************************************************/
#if !defined(CY_CAPSENSE_CONTROL_H)
#define CY_CAPSENSE_CONTROL_H
#include "cy_syspm.h"
#include "cy_capsense_structure.h"
#include "cy_capsense_common.h"
#if (defined(CY_IP_MXCSDV2) || defined(CY_IP_M0S8CSDV2) || defined(CY_IP_M0S8MSCV3) || defined(CY_IP_M0S8MSCV3LP))
#if defined(__cplusplus)
extern "C" {
#endif
/*******************************************************************************
* Function Prototypes
*******************************************************************************/
/******************************************************************************/
/** \addtogroup group_capsense_high_level *//** \{ */
/******************************************************************************/
cy_capsense_status_t Cy_CapSense_Init(cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_DeInit(cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_Enable(cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_Save(cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_Restore(cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_ProcessAllWidgets(
cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_ProcessWidget(
uint32_t widgetId,
cy_stc_capsense_context_t * context);
#if ((CY_CAPSENSE_DISABLE != CY_CAPSENSE_GESTURE_EN) || \
(CY_CAPSENSE_DISABLE != CY_CAPSENSE_BALLISTIC_MULTIPLIER_EN))
void Cy_CapSense_IncrementGestureTimestamp(cy_stc_capsense_context_t * context);
void Cy_CapSense_SetGestureTimestamp(
uint32_t value,
cy_stc_capsense_context_t * context);
#endif
void Cy_CapSense_Wakeup(const cy_stc_capsense_context_t * context);
cy_en_syspm_status_t Cy_CapSense_DeepSleepCallback(
cy_stc_syspm_callback_params_t * callbackParams,
cy_en_syspm_callback_mode_t mode);
cy_capsense_status_t Cy_CapSense_RegisterCallback(
cy_en_capsense_callback_event_t callbackType,
cy_capsense_callback_t callbackFunction,
cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_UnRegisterCallback(
cy_en_capsense_callback_event_t callbackType,
cy_stc_capsense_context_t * context);
/** \} */
/******************************************************************************/
/** \addtogroup group_capsense_low_level *//** \{ */
/******************************************************************************/
cy_capsense_status_t Cy_CapSense_ProcessWidgetExt(
uint32_t widgetId,
uint32_t mode,
cy_stc_capsense_context_t * context);
cy_capsense_status_t Cy_CapSense_ProcessSensorExt(
uint32_t widgetId,
uint32_t sensorId,
uint32_t mode,
const cy_stc_capsense_context_t * context);
/** \} */
/******************************************************************************/
/** \cond SECTION_CAPSENSE_INTERNAL */
/** \addtogroup group_capsense_internal *//** \{ */
/******************************************************************************/
cy_capsense_status_t Cy_CapSense_Initialize(
cy_stc_capsense_context_t * context);
#if (CY_CAPSENSE_PLATFORM_BLOCK_FOURTH_GEN)
cy_capsense_status_t Cy_CapSense_Save_V2(
cy_stc_capsense_context_t * context);
#elif (CY_CAPSENSE_PLATFORM_BLOCK_FIFTH_GEN)
cy_capsense_status_t Cy_CapSense_Save_V3(
cy_stc_capsense_context_t * context);
#elif (CY_CAPSENSE_PLATFORM_BLOCK_FIFTH_GEN_LP)
cy_capsense_status_t Cy_CapSense_Save_V3Lp(
cy_stc_capsense_context_t * context);
#endif
#if (CY_CAPSENSE_PLATFORM_BLOCK_FOURTH_GEN)
cy_capsense_status_t Cy_CapSense_Restore_V2(
cy_stc_capsense_context_t * context);
#elif (CY_CAPSENSE_PLATFORM_BLOCK_FIFTH_GEN)
cy_capsense_status_t Cy_CapSense_Restore_V3(
cy_stc_capsense_context_t * context);
#elif (CY_CAPSENSE_PLATFORM_BLOCK_FIFTH_GEN_LP)
cy_capsense_status_t Cy_CapSense_Restore_V3Lp(
cy_stc_capsense_context_t * context);
#endif
/** \} \endcond */
#if defined(__cplusplus)
}
#endif
#endif /* (defined(CY_IP_MXCSDV2) || defined(CY_IP_M0S8CSDV2) || defined(CY_IP_M0S8MSCV3) || defined(CY_IP_M0S8MSCV3LP)) */
#endif /* CY_CAPSENSE_CONTROL_H */
/* [] END OF FILE */