-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcy_capsense_control.h
118 lines (87 loc) · 4.29 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
/***************************************************************************//**
* \file cy_capsense_control.h
* \version 3.0
*
* \brief
* This file provides the function prototypes of the Control module.
*
********************************************************************************
* \copyright
* Copyright 2018-2020, 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))
#if defined(__cplusplus)
extern "C" {
#endif
/*******************************************************************************
* Local definition
*******************************************************************************/
#define CY_CAPSENSE_INIT_DONE (1u)
#define CY_CAPSENSE_INIT_NEEDED (0u)
#define CY_CAPSENSE_ANALOG_SETTLING_TIME_US (25u)
/*******************************************************************************
* 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);
void Cy_CapSense_IncrementGestureTimestamp(cy_stc_capsense_context_t * context);
void Cy_CapSense_SetGestureTimestamp(
uint32_t value,
cy_stc_capsense_context_t * context);
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);
/** \} \endcond */
#if defined(__cplusplus)
}
#endif
#endif /* (defined(CY_IP_MXCSDV2) || defined(CY_IP_M0S8CSDV2) || defined(CY_IP_M0S8MSCV3)) */
#endif /* CY_CAPSENSE_CONTROL_H */
/* [] END OF FILE */