mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-13 04:33:18 +08:00
format code
This commit is contained in:
@@ -19,11 +19,11 @@ if GetDepend(['RT_USING_SERIAL']):
|
||||
src += ['drv_uart.c']
|
||||
|
||||
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
|
||||
if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2') or GetDepend('BSP_USING_I2C3') or GetDepend('BSP_USING_I2C4'):
|
||||
if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2'):
|
||||
src += ['drv_soft_i2c.c']
|
||||
|
||||
if GetDepend(['RT_USING_ADC']):
|
||||
src += Glob('drv_adc.c')
|
||||
src += ['drv_adc.c']
|
||||
|
||||
path = [cwd]
|
||||
path += [cwd + '/config']
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-06-29 Rbb666 first version
|
||||
* 2022-06-29 Rbb666 first version
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __DRV_UART_H__
|
||||
#define __DRV_UART_H__
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
* CapSense Configurator 4.0.0.6195
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* or an affiliate of Cypress Semiconductor Corporation.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
* CapSense Configurator 4.0.0.6195
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* or an affiliate of Cypress Semiconductor Corporation.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
||||
+2
-2
@@ -4,14 +4,14 @@
|
||||
* Description:
|
||||
* CAPSENSE configuration defines.
|
||||
*
|
||||
* Note: This file is required for the CAPSENSE Middleware Library to build
|
||||
* Note: This file is required for the CAPSENSE Middleware Library to build
|
||||
* successfully.
|
||||
*
|
||||
* This file should not be modified. It was automatically generated by
|
||||
* CapSense Configurator 4.0.0.6195
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* or an affiliate of Cypress Semiconductor Corporation.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
* CapSense Configurator 4.0.0.6195
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* Copyright 2022, Cypress Semiconductor Corporation (an Infineon company)
|
||||
* or an affiliate of Cypress Semiconductor Corporation.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#include "cycfg_clocks.h"
|
||||
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_CLK_DIV_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_CLK_DIV_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_CLOCK,
|
||||
.block_num = CYBSP_CSD_CLK_DIV_HW,
|
||||
|
||||
+12
-12
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "cycfg_dmas.h"
|
||||
|
||||
const cy_stc_dma_descriptor_config_t TxDma_Descriptor_0_config =
|
||||
const cy_stc_dma_descriptor_config_t TxDma_Descriptor_0_config =
|
||||
{
|
||||
.retrigger = CY_DMA_RETRIG_4CYC,
|
||||
.interruptType = CY_DMA_DESCR,
|
||||
@@ -50,7 +50,7 @@ const cy_stc_dma_descriptor_config_t TxDma_Descriptor_0_config =
|
||||
.yCount = 1,
|
||||
.nextDescriptor = NULL,
|
||||
};
|
||||
cy_stc_dma_descriptor_t TxDma_Descriptor_0 =
|
||||
cy_stc_dma_descriptor_t TxDma_Descriptor_0 =
|
||||
{
|
||||
.ctl = 0UL,
|
||||
.src = 0UL,
|
||||
@@ -59,7 +59,7 @@ cy_stc_dma_descriptor_t TxDma_Descriptor_0 =
|
||||
.yCtl = 0UL,
|
||||
.nextPtr = 0UL,
|
||||
};
|
||||
const cy_stc_dma_channel_config_t TxDma_channelConfig =
|
||||
const cy_stc_dma_channel_config_t TxDma_channelConfig =
|
||||
{
|
||||
.descriptor = &TxDma_Descriptor_0,
|
||||
.preemptable = false,
|
||||
@@ -67,7 +67,7 @@ const cy_stc_dma_channel_config_t TxDma_channelConfig =
|
||||
.enable = false,
|
||||
.bufferable = false,
|
||||
};
|
||||
const cy_stc_dma_crc_config_t TxDma_crcConfig =
|
||||
const cy_stc_dma_crc_config_t TxDma_crcConfig =
|
||||
{
|
||||
.dataReverse = false,
|
||||
.dataXor = 0,
|
||||
@@ -76,14 +76,14 @@ const cy_stc_dma_crc_config_t TxDma_crcConfig =
|
||||
.polynomial = 79764919,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t TxDma_obj =
|
||||
const cyhal_resource_inst_t TxDma_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_DMA,
|
||||
.block_num = 0U,
|
||||
.channel_num = TxDma_CHANNEL,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_dma_descriptor_config_t RxDma_Descriptor_0_config =
|
||||
const cy_stc_dma_descriptor_config_t RxDma_Descriptor_0_config =
|
||||
{
|
||||
.retrigger = CY_DMA_RETRIG_4CYC,
|
||||
.interruptType = CY_DMA_1ELEMENT,
|
||||
@@ -104,7 +104,7 @@ const cy_stc_dma_descriptor_config_t RxDma_Descriptor_0_config =
|
||||
.yCount = 1,
|
||||
.nextDescriptor = &RxDma_Descriptor_1,
|
||||
};
|
||||
const cy_stc_dma_descriptor_config_t RxDma_Descriptor_1_config =
|
||||
const cy_stc_dma_descriptor_config_t RxDma_Descriptor_1_config =
|
||||
{
|
||||
.retrigger = CY_DMA_RETRIG_4CYC,
|
||||
.interruptType = CY_DMA_DESCR,
|
||||
@@ -125,7 +125,7 @@ const cy_stc_dma_descriptor_config_t RxDma_Descriptor_1_config =
|
||||
.yCount = 1,
|
||||
.nextDescriptor = &RxDma_Descriptor_0,
|
||||
};
|
||||
cy_stc_dma_descriptor_t RxDma_Descriptor_0 =
|
||||
cy_stc_dma_descriptor_t RxDma_Descriptor_0 =
|
||||
{
|
||||
.ctl = 0UL,
|
||||
.src = 0UL,
|
||||
@@ -134,7 +134,7 @@ cy_stc_dma_descriptor_t RxDma_Descriptor_0 =
|
||||
.yCtl = 0UL,
|
||||
.nextPtr = 0UL,
|
||||
};
|
||||
cy_stc_dma_descriptor_t RxDma_Descriptor_1 =
|
||||
cy_stc_dma_descriptor_t RxDma_Descriptor_1 =
|
||||
{
|
||||
.ctl = 0UL,
|
||||
.src = 0UL,
|
||||
@@ -143,7 +143,7 @@ cy_stc_dma_descriptor_t RxDma_Descriptor_1 =
|
||||
.yCtl = 0UL,
|
||||
.nextPtr = 0UL,
|
||||
};
|
||||
const cy_stc_dma_channel_config_t RxDma_channelConfig =
|
||||
const cy_stc_dma_channel_config_t RxDma_channelConfig =
|
||||
{
|
||||
.descriptor = &RxDma_Descriptor_0,
|
||||
.preemptable = false,
|
||||
@@ -151,7 +151,7 @@ const cy_stc_dma_channel_config_t RxDma_channelConfig =
|
||||
.enable = false,
|
||||
.bufferable = false,
|
||||
};
|
||||
const cy_stc_dma_crc_config_t RxDma_crcConfig =
|
||||
const cy_stc_dma_crc_config_t RxDma_crcConfig =
|
||||
{
|
||||
.dataReverse = false,
|
||||
.dataXor = 0,
|
||||
@@ -160,7 +160,7 @@ const cy_stc_dma_crc_config_t RxDma_crcConfig =
|
||||
.polynomial = 79764919,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t RxDma_obj =
|
||||
const cyhal_resource_inst_t RxDma_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_DMA,
|
||||
.block_num = 0U,
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "cycfg_peripherals.h"
|
||||
|
||||
cy_stc_csd_context_t cy_csd_0_context =
|
||||
cy_stc_csd_context_t cy_csd_0_context =
|
||||
{
|
||||
.lockKey = CY_CSD_NONE_KEY,
|
||||
};
|
||||
|
||||
+32
-32
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "cycfg_pins.h"
|
||||
|
||||
const cy_stc_gpio_pin_config_t CYBSP_WCO_IN_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_WCO_IN_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -46,14 +46,14 @@ const cy_stc_gpio_pin_config_t CYBSP_WCO_IN_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_WCO_IN_obj =
|
||||
const cyhal_resource_inst_t CYBSP_WCO_IN_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_WCO_IN_PORT_NUM,
|
||||
.channel_num = CYBSP_WCO_IN_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_WCO_OUT_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_WCO_OUT_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -70,14 +70,14 @@ const cy_stc_gpio_pin_config_t CYBSP_WCO_OUT_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_WCO_OUT_obj =
|
||||
const cyhal_resource_inst_t CYBSP_WCO_OUT_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_WCO_OUT_PORT_NUM,
|
||||
.channel_num = CYBSP_WCO_OUT_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_RX_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_RX_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -94,14 +94,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_RX_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_RX_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_RX_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_RX_PORT_NUM,
|
||||
.channel_num = CYBSP_CSD_RX_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_SWO_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_SWO_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
@@ -118,14 +118,14 @@ const cy_stc_gpio_pin_config_t CYBSP_SWO_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_SWO_obj =
|
||||
const cyhal_resource_inst_t CYBSP_SWO_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_SWO_PORT_NUM,
|
||||
.channel_num = CYBSP_SWO_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_SWDIO_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_SWDIO_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_PULLUP,
|
||||
@@ -142,14 +142,14 @@ const cy_stc_gpio_pin_config_t CYBSP_SWDIO_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_SWDIO_obj =
|
||||
const cyhal_resource_inst_t CYBSP_SWDIO_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_SWDIO_PORT_NUM,
|
||||
.channel_num = CYBSP_SWDIO_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_SWDCK_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_SWDCK_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_PULLDOWN,
|
||||
@@ -166,14 +166,14 @@ const cy_stc_gpio_pin_config_t CYBSP_SWDCK_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_SWDCK_obj =
|
||||
const cyhal_resource_inst_t CYBSP_SWDCK_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_SWDCK_PORT_NUM,
|
||||
.channel_num = CYBSP_SWDCK_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CINA_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CINA_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -190,14 +190,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CINA_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CINA_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CINA_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CINA_PORT_NUM,
|
||||
.channel_num = CYBSP_CINA_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CINB_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CINB_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -214,14 +214,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CINB_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CINB_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CINB_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CINB_PORT_NUM,
|
||||
.channel_num = CYBSP_CINB_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CMOD_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CMOD_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -238,14 +238,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CMOD_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CMOD_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CMOD_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CMOD_PORT_NUM,
|
||||
.channel_num = CYBSP_CMOD_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN0_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -262,14 +262,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN0_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_BTN0_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_BTN0_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_BTN0_PORT_NUM,
|
||||
.channel_num = CYBSP_CSD_BTN0_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN1_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN1_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -286,14 +286,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN1_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_BTN1_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_BTN1_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_BTN1_PORT_NUM,
|
||||
.channel_num = CYBSP_CSD_BTN1_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD0_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -310,14 +310,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD0_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD0_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD0_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_SLD0_PORT_NUM,
|
||||
.channel_num = CYBSP_CSD_SLD0_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD1_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD1_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -334,14 +334,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD1_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD1_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD1_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_SLD1_PORT_NUM,
|
||||
.channel_num = CYBSP_CSD_SLD1_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD2_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD2_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -358,14 +358,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD2_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD2_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD2_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_SLD2_PORT_NUM,
|
||||
.channel_num = CYBSP_CSD_SLD2_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD3_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD3_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -382,14 +382,14 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD3_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD3_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD3_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_SLD3_PORT_NUM,
|
||||
.channel_num = CYBSP_CSD_SLD3_PIN,
|
||||
};
|
||||
#endif //defined (CY_USING_HAL)
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD4_config =
|
||||
const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD4_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
@@ -406,7 +406,7 @@ const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD4_config =
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
#if defined (CY_USING_HAL)
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD4_obj =
|
||||
const cyhal_resource_inst_t CYBSP_CSD_SLD4_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_GPIO,
|
||||
.block_num = CYBSP_CSD_SLD4_PORT_NUM,
|
||||
|
||||
+18
-18
@@ -63,7 +63,7 @@ extern "C" {
|
||||
#define CYBSP_WCO_IN_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_WCO_IN_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_WCO_IN_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_WCO_IN_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG
|
||||
@@ -90,7 +90,7 @@ extern "C" {
|
||||
#define CYBSP_WCO_OUT_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_WCO_OUT_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_WCO_OUT_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_WCO_OUT_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG
|
||||
@@ -246,7 +246,7 @@ extern "C" {
|
||||
#define CYBSP_CS_TX_RX_HAL_IRQ CYBSP_CSD_RX_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_RX_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_RX_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_RX_HAL_DIR CYBSP_CSD_RX_HAL_DIR
|
||||
#define CYBSP_CS_TX_RX_HAL_DIR CYBSP_CSD_RX_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
@@ -320,8 +320,8 @@ extern "C" {
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_DEBUG_UART_TX (P5_1)
|
||||
#define CYBSP_D1 CYBSP_DEBUG_UART_TX
|
||||
#define CYBSP_DEBUG_UART_TX_PORT GPIO_PRT5
|
||||
#define CYBSP_DEBUG_UART_TX_PIN 1U
|
||||
#define CYBSP_DEBUG_UART_TX_PORT GPIO_PRT5
|
||||
#define CYBSP_DEBUG_UART_TX_PIN 1U
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_DEBUG_UART_RTS (P5_2)
|
||||
@@ -373,7 +373,7 @@ extern "C" {
|
||||
#define CYBSP_SWO_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_SWO_HAL_DIR CYHAL_GPIO_DIR_OUTPUT
|
||||
#define CYBSP_SWO_HAL_DIR CYHAL_GPIO_DIR_OUTPUT
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_SWO_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_STRONG
|
||||
@@ -400,7 +400,7 @@ extern "C" {
|
||||
#define CYBSP_SWDIO_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_SWDIO_HAL_DIR CYHAL_GPIO_DIR_BIDIRECTIONAL
|
||||
#define CYBSP_SWDIO_HAL_DIR CYHAL_GPIO_DIR_BIDIRECTIONAL
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_SWDIO_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_PULLUP
|
||||
@@ -427,7 +427,7 @@ extern "C" {
|
||||
#define CYBSP_SWDCK_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_SWDCK_HAL_DIR CYHAL_GPIO_DIR_BIDIRECTIONAL
|
||||
#define CYBSP_SWDCK_HAL_DIR CYHAL_GPIO_DIR_BIDIRECTIONAL
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_SWDCK_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_PULLDOWN
|
||||
@@ -454,7 +454,7 @@ extern "C" {
|
||||
#define CYBSP_CINA_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CINA_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CINA_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CINA_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG
|
||||
@@ -481,7 +481,7 @@ extern "C" {
|
||||
#define CYBSP_CINB_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CINB_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CINB_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CINB_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG
|
||||
@@ -518,7 +518,7 @@ extern "C" {
|
||||
#define CYBSP_CMOD_HAL_IRQ CYHAL_GPIO_IRQ_NONE
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CMOD_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CMOD_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CMOD_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG
|
||||
@@ -557,7 +557,7 @@ extern "C" {
|
||||
#define CYBSP_CS_BTN0_HAL_IRQ CYBSP_CSD_BTN0_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_BTN0_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_BTN0_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_BTN0_HAL_DIR CYBSP_CSD_BTN0_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
@@ -598,7 +598,7 @@ extern "C" {
|
||||
#define CYBSP_CS_BTN1_HAL_IRQ CYBSP_CSD_BTN1_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_BTN1_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_BTN1_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_BTN1_HAL_DIR CYBSP_CSD_BTN1_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
@@ -639,7 +639,7 @@ extern "C" {
|
||||
#define CYBSP_CS_SLD0_HAL_IRQ CYBSP_CSD_SLD0_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_SLD0_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_SLD0_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_SLD0_HAL_DIR CYBSP_CSD_SLD0_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
@@ -680,7 +680,7 @@ extern "C" {
|
||||
#define CYBSP_CS_SLD1_HAL_IRQ CYBSP_CSD_SLD1_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_SLD1_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_SLD1_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_SLD1_HAL_DIR CYBSP_CSD_SLD1_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
@@ -721,7 +721,7 @@ extern "C" {
|
||||
#define CYBSP_CS_SLD2_HAL_IRQ CYBSP_CSD_SLD2_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_SLD2_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_SLD2_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_SLD2_HAL_DIR CYBSP_CSD_SLD2_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
@@ -762,7 +762,7 @@ extern "C" {
|
||||
#define CYBSP_CS_SLD3_HAL_IRQ CYBSP_CSD_SLD3_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_SLD3_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_SLD3_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_SLD3_HAL_DIR CYBSP_CSD_SLD3_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
@@ -803,7 +803,7 @@ extern "C" {
|
||||
#define CYBSP_CS_SLD4_HAL_IRQ CYBSP_CSD_SLD4_HAL_IRQ
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
#define CYBSP_CSD_SLD4_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CSD_SLD4_HAL_DIR CYHAL_GPIO_DIR_INPUT
|
||||
#define CYBSP_CS_SLD4_HAL_DIR CYBSP_CSD_SLD4_HAL_DIR
|
||||
#endif //defined (CY_USING_HAL)
|
||||
#if defined (CY_USING_HAL)
|
||||
|
||||
+161
-161
File diff suppressed because it is too large
Load Diff
@@ -740,7 +740,7 @@ extern "C" {
|
||||
/**
|
||||
* \addtogroup group_bsp_pins_capsense Capsense
|
||||
* \{
|
||||
* Pins connected to CAPSENSE™ sensors on the board.
|
||||
* Pins connected to CAPSENSEâ„¢ sensors on the board.
|
||||
*/
|
||||
|
||||
#ifdef CYBSP_CSD_TX
|
||||
|
||||
@@ -403,8 +403,8 @@
|
||||
* </table>
|
||||
*
|
||||
* \note
|
||||
* * To select values for the Scan mode and Sensor connection method parameters (for the fifth-generation of the CAPSENSE™ HW)
|
||||
* navigate to the Advanced tab in the CAPSENSE™ Configurator tool, and then select the General settings sub-tab.
|
||||
* * To select values for the Scan mode and Sensor connection method parameters (for the fifth-generation of the CAPSENSE™ HW)
|
||||
* navigate to the Advanced tab in the CAPSENSE™ Configurator tool, and then select the General settings sub-tab.
|
||||
*
|
||||
* * For the forth-generation of the CAPSENSE™ HW, the IntDrv mode with the AMUX sensor connection type is available only.
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -832,7 +832,7 @@ extern "C" {
|
||||
/** Return status \ref cy_capsense_status_t of CAPSENSE™ operation: Unable to perform calibration */
|
||||
#define CY_CAPSENSE_STATUS_CALIBRATION_CHECK_FAIL (0x400u)
|
||||
/** Return status \ref cy_capsense_status_t of CAPSENSE™ operation: Sense Clock Divider
|
||||
* is out of the valid range for the specified Clock source configuration
|
||||
* is out of the valid range for the specified Clock source configuration
|
||||
*/
|
||||
#define CY_CAPSENSE_STATUS_BAD_CLOCK_CONFIG (0x800u)
|
||||
/** Return status \ref cy_capsense_status_t of CAPSENSE™ operation: Unknown */
|
||||
|
||||
@@ -54,21 +54,21 @@ 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,
|
||||
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,
|
||||
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_stc_syspm_callback_params_t * callbackParams,
|
||||
cy_en_syspm_callback_mode_t mode);
|
||||
|
||||
cy_capsense_status_t Cy_CapSense_RegisterCallback(
|
||||
@@ -87,13 +87,13 @@ cy_capsense_status_t Cy_CapSense_UnRegisterCallback(
|
||||
/******************************************************************************/
|
||||
|
||||
cy_capsense_status_t Cy_CapSense_ProcessWidgetExt(
|
||||
uint32_t widgetId,
|
||||
uint32_t mode,
|
||||
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,
|
||||
uint32_t widgetId,
|
||||
uint32_t sensorId,
|
||||
uint32_t mode,
|
||||
const cy_stc_capsense_context_t * context);
|
||||
/** \} */
|
||||
|
||||
|
||||
@@ -1372,7 +1372,7 @@ static void Cy_CapSense_CSXSetSnsClkFreq(uint32_t channelIndex, cy_stc_capsense_
|
||||
{
|
||||
snsClkDivider = 1u;
|
||||
}
|
||||
|
||||
|
||||
#if (CY_CAPSENSE_ENABLE == CY_CAPSENSE_MULTI_FREQUENCY_SCAN_EN)
|
||||
/* Change the divider based on the chId */
|
||||
switch (channelIndex)
|
||||
|
||||
@@ -57,21 +57,21 @@ static cy_capsense_status_t Cy_CapSense_CheckBaselineInv(
|
||||
* Function Name: Cy_CapSense_UpdateAllBaselines
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Updates the baseline for all the sensors in all the widgets.
|
||||
*
|
||||
* Baselines must be updated after sensor scan to ignore low frequency
|
||||
* changes in the sensor data caused by environment changes such as
|
||||
* temperature from sensor status decision.
|
||||
*
|
||||
* Updates the baseline for all the sensors in all the widgets.
|
||||
*
|
||||
* Baselines must be updated after sensor scan to ignore low frequency
|
||||
* changes in the sensor data caused by environment changes such as
|
||||
* temperature from sensor status decision.
|
||||
*
|
||||
* This function ignores the widget enable bit in the widget status register.
|
||||
* Calling this function multiple times without a new sensor scan leads to
|
||||
* unexpected behavior and should be avoided.
|
||||
*
|
||||
* This function is called by Cy_CapSense_ProcessAllWidgets() and
|
||||
* Cy_CapSense_ProcessWidget(), hence the application program need not use this
|
||||
* function if any of the above functions is already used. This function can be
|
||||
* Calling this function multiple times without a new sensor scan leads to
|
||||
* unexpected behavior and should be avoided.
|
||||
*
|
||||
* This function is called by Cy_CapSense_ProcessAllWidgets() and
|
||||
* Cy_CapSense_ProcessWidget(), hence the application program need not use this
|
||||
* function if any of the above functions is already used. This function can be
|
||||
* used for custom application implementation.
|
||||
*
|
||||
*
|
||||
* \param context
|
||||
* The pointer to the CAPSENSE™ context structure \ref cy_stc_capsense_context_t.
|
||||
*
|
||||
@@ -100,20 +100,20 @@ cy_capsense_status_t Cy_CapSense_UpdateAllBaselines(
|
||||
* Function Name: Cy_CapSense_UpdateWidgetBaseline
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Updates the baselines for all the sensors in a widget specified by
|
||||
* the input parameter.
|
||||
*
|
||||
* This function performs exactly the same tasks as
|
||||
* Updates the baselines for all the sensors in a widget specified by
|
||||
* the input parameter.
|
||||
*
|
||||
* This function performs exactly the same tasks as
|
||||
* Cy_CapSense_UpdateAllBaselines() but only for a specified widget.
|
||||
*
|
||||
* Calling this function multiple times without a new sensor scan leads to
|
||||
* unexpected behavior and should be avoided. The application program need
|
||||
* not use this function if the Cy_CapSense_UpdateAllBaselines(),
|
||||
* Cy_CapSense_ProcessAllWidgets() or Cy_CapSense_ProcessWidget() functions
|
||||
*
|
||||
* Calling this function multiple times without a new sensor scan leads to
|
||||
* unexpected behavior and should be avoided. The application program need
|
||||
* not use this function if the Cy_CapSense_UpdateAllBaselines(),
|
||||
* Cy_CapSense_ProcessAllWidgets() or Cy_CapSense_ProcessWidget() functions
|
||||
* are already used.
|
||||
*
|
||||
* \param widgetId
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* in the cycfg_capsense.h file defined as CY_CAPSENSE_<WIDGET_NAME>_WDGT_ID.
|
||||
*
|
||||
* \param context
|
||||
@@ -126,7 +126,7 @@ cy_capsense_status_t Cy_CapSense_UpdateAllBaselines(
|
||||
*
|
||||
*******************************************************************************/
|
||||
cy_capsense_status_t Cy_CapSense_UpdateWidgetBaseline(
|
||||
uint32_t widgetId,
|
||||
uint32_t widgetId,
|
||||
const cy_stc_capsense_context_t * context)
|
||||
{
|
||||
uint32_t snsIndex;
|
||||
@@ -145,26 +145,26 @@ cy_capsense_status_t Cy_CapSense_UpdateWidgetBaseline(
|
||||
* Function Name: Cy_CapSense_UpdateSensorBaseline
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Updates the baseline for a sensor in a widget specified by the
|
||||
* input parameters.
|
||||
*
|
||||
* This function performs exactly the same tasks as
|
||||
* Cy_CapSense_UpdateAllBaselines() and Cy_CapSense_UpdateWidgetBaseline()
|
||||
* Updates the baseline for a sensor in a widget specified by the
|
||||
* input parameters.
|
||||
*
|
||||
* This function performs exactly the same tasks as
|
||||
* Cy_CapSense_UpdateAllBaselines() and Cy_CapSense_UpdateWidgetBaseline()
|
||||
* but only for a specified sensor.
|
||||
*
|
||||
* Calling this function multiple times without a new sensor scan leads to
|
||||
* unexpected behavior and should be avoided. The application need not use
|
||||
* this function if the Cy_CapSense_UpdateWidgetBaseline (),
|
||||
* Cy_CapSense_UpdateAllBaselines (), Cy_CapSense_ProcessAllWidgets(),
|
||||
*
|
||||
* Calling this function multiple times without a new sensor scan leads to
|
||||
* unexpected behavior and should be avoided. The application need not use
|
||||
* this function if the Cy_CapSense_UpdateWidgetBaseline (),
|
||||
* Cy_CapSense_UpdateAllBaselines (), Cy_CapSense_ProcessAllWidgets(),
|
||||
* or Cy_CapSense_ProcessWidget() functions are already used.
|
||||
*
|
||||
* \param widgetId
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* in the cycfg_capsense.h file defined as CY_CAPSENSE_<WIDGET_NAME>_WDGT_ID.
|
||||
*
|
||||
* \param sensorId
|
||||
* Specifies the ID number of the sensor within the widget. A macro for the
|
||||
* sensor ID within a specified widget can be found in the cycfg_capsense.h
|
||||
* Specifies the ID number of the sensor within the widget. A macro for the
|
||||
* sensor ID within a specified widget can be found in the cycfg_capsense.h
|
||||
* file defined as CY_CAPSENSE_<WIDGET_NAME>_SNS<SENSOR_NUMBER>_ID.
|
||||
*
|
||||
* \param context
|
||||
@@ -177,8 +177,8 @@ cy_capsense_status_t Cy_CapSense_UpdateWidgetBaseline(
|
||||
*
|
||||
*******************************************************************************/
|
||||
cy_capsense_status_t Cy_CapSense_UpdateSensorBaseline(
|
||||
uint32_t widgetId,
|
||||
uint32_t sensorId,
|
||||
uint32_t widgetId,
|
||||
uint32_t sensorId,
|
||||
const cy_stc_capsense_context_t * context)
|
||||
{
|
||||
uint32_t result;
|
||||
@@ -360,19 +360,19 @@ cy_capsense_status_t Cy_CapSense_FtUpdateBaseline(
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Initializes the baselines of all the sensors of all the widgets.
|
||||
*
|
||||
* This function initializes baselines for all sensors and widgets in the project.
|
||||
* It can also be used to re-initialize baselines at any time, however, note
|
||||
* that all sensor data history information and sensor status shall be reset
|
||||
*
|
||||
* This function initializes baselines for all sensors and widgets in the project.
|
||||
* It can also be used to re-initialize baselines at any time, however, note
|
||||
* that all sensor data history information and sensor status shall be reset
|
||||
* along with re-initialization of baseline.
|
||||
*
|
||||
* Following functions to initialize sensor and widgets and filter history
|
||||
* should be called after initializing baseline for proper operation of
|
||||
*
|
||||
* Following functions to initialize sensor and widgets and filter history
|
||||
* should be called after initializing baseline for proper operation of
|
||||
* the CAPSENSE™ middleware:
|
||||
* * Cy_CapSense_InitializeAllStatuses()
|
||||
* * Cy_CapSense_InitializeAllFilters()
|
||||
*
|
||||
* These functions are called by the CapSense_Enable() function, hence it is
|
||||
*
|
||||
* These functions are called by the CapSense_Enable() function, hence it is
|
||||
* not required to use this function if above function is used.
|
||||
*
|
||||
* \param context
|
||||
@@ -394,24 +394,24 @@ void Cy_CapSense_InitializeAllBaselines(cy_stc_capsense_context_t * context)
|
||||
* Function Name: Cy_CapSense_InitializeWidgetBaseline
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Initializes the baselines of all the sensors in a specific widget.
|
||||
*
|
||||
* This function initializes baselines for all sensors in a specific widget
|
||||
* in the project. It can also be used to re-initialize baselines at any time,
|
||||
* however, note that all sensor data history information and sensor status
|
||||
* Initializes the baselines of all the sensors in a specific widget.
|
||||
*
|
||||
* This function initializes baselines for all sensors in a specific widget
|
||||
* in the project. It can also be used to re-initialize baselines at any time,
|
||||
* however, note that all sensor data history information and sensor status
|
||||
* should be reset along with re-initialization of baseline.
|
||||
*
|
||||
* The following functions to initialize sensor and widgets and filter history
|
||||
* should be called after initializing baselines for proper operation of
|
||||
*
|
||||
* The following functions to initialize sensor and widgets and filter history
|
||||
* should be called after initializing baselines for proper operation of
|
||||
* middleware.
|
||||
* * Cy_CapSense_InitializeWidgetStatus()
|
||||
* * Cy_CapSense_InitializeWidgetFilter()
|
||||
*
|
||||
* These functions are called by CapSense_Enable() function, hence it is not
|
||||
*
|
||||
* These functions are called by CapSense_Enable() function, hence it is not
|
||||
* required to use this function is above function is used.
|
||||
*
|
||||
*
|
||||
* \param widgetId
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* in the cycfg_capsense.h file defined as CY_CAPSENSE_<WIDGET_NAME>_WDGT_ID.
|
||||
*
|
||||
* \param context
|
||||
@@ -419,7 +419,7 @@ void Cy_CapSense_InitializeAllBaselines(cy_stc_capsense_context_t * context)
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_InitializeWidgetBaseline(
|
||||
uint32_t widgetId,
|
||||
uint32_t widgetId,
|
||||
cy_stc_capsense_context_t * context)
|
||||
{
|
||||
uint32_t snsIndex;
|
||||
@@ -439,12 +439,12 @@ void Cy_CapSense_InitializeWidgetBaseline(
|
||||
* by the input parameters.
|
||||
*
|
||||
* \param widgetId
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* in the cycfg_capsense.h file defined as CY_CAPSENSE_<WIDGET_NAME>_WDGT_ID.
|
||||
*
|
||||
* \param sensorId
|
||||
* Specifies the ID number of the sensor within the widget. A macro for the
|
||||
* sensor ID within a specified widget can be found in the cycfg_capsense.h
|
||||
* Specifies the ID number of the sensor within the widget. A macro for the
|
||||
* sensor ID within a specified widget can be found in the cycfg_capsense.h
|
||||
* file defined as CY_CAPSENSE_<WIDGET_NAME>_SNS<SENSOR_NUMBER>_ID.
|
||||
*
|
||||
* \param context
|
||||
@@ -452,8 +452,8 @@ void Cy_CapSense_InitializeWidgetBaseline(
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_InitializeSensorBaseline(
|
||||
uint32_t widgetId,
|
||||
uint32_t sensorId,
|
||||
uint32_t widgetId,
|
||||
uint32_t sensorId,
|
||||
cy_stc_capsense_context_t * context)
|
||||
{
|
||||
uint32_t cxtOffset;
|
||||
@@ -484,7 +484,7 @@ void Cy_CapSense_InitializeSensorBaseline(
|
||||
* Initializes the baseline history for a sensor indicated by an input
|
||||
* parameter.
|
||||
*
|
||||
* \param ptrSnsContext
|
||||
* \param ptrSnsContext
|
||||
* The pointer to the sensor context structure.
|
||||
*
|
||||
*******************************************************************************/
|
||||
@@ -500,10 +500,10 @@ void Cy_CapSense_FtInitializeBaseline(cy_stc_capsense_sensor_context_t * ptrSnsC
|
||||
* Function Name: Cy_CapSense_InitializeAllFilters
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Initializes (or re-initializes) all the firmware filter history, except
|
||||
* Initializes (or re-initializes) all the firmware filter history, except
|
||||
* the baseline.
|
||||
*
|
||||
* Calling this function is accompanied by
|
||||
* Calling this function is accompanied by
|
||||
* * Cy_CapSense_InitializeAllStatuses()
|
||||
* * Cy_CapSense_InitializeAllBaselines()
|
||||
*
|
||||
@@ -526,15 +526,15 @@ void Cy_CapSense_InitializeAllFilters(const cy_stc_capsense_context_t * context)
|
||||
* Function Name: Cy_CapSense_InitializeWidgetFilter
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Initializes (or re-initializes) the raw count filter history of all
|
||||
* Initializes (or re-initializes) the raw count filter history of all
|
||||
* the sensors in a widget specified by the input parameter.
|
||||
*
|
||||
* Calling this function is accompanied by
|
||||
* Calling this function is accompanied by
|
||||
* - Cy_CapSense_InitializeWidgetStatus().
|
||||
* - Cy_CapSense_InitializeWidgetBaseline().
|
||||
*
|
||||
* \param widgetId
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* Specifies the ID number of the widget. A macro for the widget ID can be found
|
||||
* in the cycfg_capsense.h file defined as CY_CAPSENSE_<WIDGET_NAME>_WDGT_ID.
|
||||
*
|
||||
* \param context
|
||||
@@ -542,7 +542,7 @@ void Cy_CapSense_InitializeAllFilters(const cy_stc_capsense_context_t * context)
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_InitializeWidgetFilter(
|
||||
uint32_t widgetId,
|
||||
uint32_t widgetId,
|
||||
const cy_stc_capsense_context_t * context)
|
||||
{
|
||||
uint32_t snsIndex;
|
||||
@@ -628,7 +628,7 @@ void Cy_CapSense_InitializeWidgetFilter(
|
||||
*
|
||||
* Initializes the IIR filter history.
|
||||
*
|
||||
* \param ptrWdConfig
|
||||
* \param ptrWdConfig
|
||||
* The pointer to the widget configuration structure.
|
||||
*
|
||||
* \param ptrSnsContext
|
||||
@@ -755,8 +755,8 @@ void Cy_CapSense_RunMedianInternal(
|
||||
uint16_t * ptrSnsRawHistory)
|
||||
{
|
||||
uint32_t temp = Cy_CapSense_FtMedian(
|
||||
(uint32_t)ptrSnsContext->raw,
|
||||
(uint32_t)ptrSnsRawHistory[0u],
|
||||
(uint32_t)ptrSnsContext->raw,
|
||||
(uint32_t)ptrSnsRawHistory[0u],
|
||||
(uint32_t)ptrSnsRawHistory[1u]);
|
||||
|
||||
(void)ptrWdConfig;
|
||||
@@ -802,7 +802,7 @@ void Cy_CapSense_InitializeAverageInternal(
|
||||
*
|
||||
* Runs the average filter.
|
||||
*
|
||||
* \param ptrWdConfig
|
||||
* \param ptrWdConfig
|
||||
* The pointer to the widget configuration structure.
|
||||
*
|
||||
* \param ptrSnsContext
|
||||
@@ -841,7 +841,7 @@ void Cy_CapSense_RunAverageInternal(
|
||||
*
|
||||
* Runs all enabled filters.
|
||||
*
|
||||
* \param ptrWdConfig
|
||||
* \param ptrWdConfig
|
||||
* The pointer to the widget configuration structure.
|
||||
*
|
||||
* \param ptrSnsContext
|
||||
@@ -870,7 +870,7 @@ void Cy_CapSense_FtRunEnabledFiltersInternal(
|
||||
Cy_CapSense_RunMedianInternal(ptrWdConfig, ptrSnsContext, ptrSnsRawHistoryLocal);
|
||||
ptrSnsRawHistoryLocal += CY_CAPSENSE_RC_MEDIAN_SIZE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (CY_CAPSENSE_REGULAR_RC_IIR_FILTER_EN || CY_CAPSENSE_PROX_RC_IIR_FILTER_EN)
|
||||
if(0u != (CY_CAPSENSE_RC_FILTER_IIR_EN_MASK & rawFilterCfg))
|
||||
|
||||
@@ -172,11 +172,11 @@ typedef struct
|
||||
cy_stc_capsense_gesture_position_t positionLast1; /**< Previous position of the first touch */
|
||||
cy_stc_capsense_gesture_position_t position2; /**< Current position of the second touch */
|
||||
cy_stc_capsense_gesture_position_t positionLast2; /**< Previous position of the second touch */
|
||||
|
||||
|
||||
uint32_t timestamp; /**< Current timestamp */
|
||||
uint16_t detected; /**< Detected gesture mask */
|
||||
uint16_t direction; /**< Mask of direction of detected gesture */
|
||||
|
||||
|
||||
cy_stc_capsense_ofrt_context_t ofrtContext; /**< One-finger rotate gesture context */
|
||||
cy_stc_capsense_ofsl_context_t ofslContext; /**< One-finger scroll gesture context */
|
||||
cy_stc_capsense_tfzm_context_t tfzmContext; /**< Two-finger zoom gesture context */
|
||||
@@ -211,7 +211,7 @@ typedef struct
|
||||
* Initializes internal variables and states.
|
||||
*
|
||||
* \param context
|
||||
* The pointer to the gesture context structure
|
||||
* The pointer to the gesture context structure
|
||||
* \ref cy_stc_capsense_gesture_context_t.
|
||||
*
|
||||
*******************************************************************************/
|
||||
@@ -235,11 +235,11 @@ void Cy_CapSense_Gesture_ResetState(
|
||||
* The pointer to the array of positions \ref cy_stc_capsense_gesture_position_t.
|
||||
*
|
||||
* \param config
|
||||
* The pointer to the gesture configuration structure
|
||||
* The pointer to the gesture configuration structure
|
||||
* \ref cy_stc_capsense_gesture_config_t.
|
||||
*
|
||||
* \param context
|
||||
* The pointer to the gesture context structure
|
||||
* The pointer to the gesture context structure
|
||||
* \ref cy_stc_capsense_gesture_context_t.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
@@ -76,9 +76,9 @@ typedef struct
|
||||
} cy_stc_capsense_advanced_centroid_config_t;
|
||||
|
||||
/** Declares position structure that keep information of a single touch.
|
||||
* Depending on a widget type each structure field keeps the following
|
||||
* Depending on a widget type each structure field keeps the following
|
||||
* information:
|
||||
*
|
||||
*
|
||||
* <table class="doxtable">
|
||||
* <tr>
|
||||
* <th>Structure Field</th>
|
||||
@@ -128,14 +128,14 @@ typedef struct
|
||||
/** Declares touch structure used to store positions of Touchpad, Matrix buttons and Slider widgets */
|
||||
typedef struct
|
||||
{
|
||||
cy_stc_capsense_position_t * ptrPosition; /**< Pointer to the array containing the position information.
|
||||
cy_stc_capsense_position_t * ptrPosition; /**< Pointer to the array containing the position information.
|
||||
A number of elements is defined by numPosition. */
|
||||
uint8_t numPosition; /**< Total number of detected touches on a widget:
|
||||
* * 0 - no touch is detected
|
||||
* * 0 - no touch is detected
|
||||
* * 1 - a single touch is detected
|
||||
* * 2 - two touches are detected
|
||||
* * 3 - three touches are detected
|
||||
* * CY_CAPSENSE_POSITION_MULTIPLE - multiple touches are detected
|
||||
* * CY_CAPSENSE_POSITION_MULTIPLE - multiple touches are detected
|
||||
* and information in position structure should be ignored.
|
||||
*/
|
||||
} cy_stc_capsense_touch_t;
|
||||
@@ -280,7 +280,7 @@ typedef struct
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_AdaptiveFilterInitialize_Lib(
|
||||
const cy_stc_capsense_adaptive_filter_config_t * config,
|
||||
const cy_stc_capsense_adaptive_filter_config_t * config,
|
||||
cy_stc_capsense_position_t * context);
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -311,8 +311,8 @@ void Cy_CapSense_AdaptiveFilterInitialize_Lib(
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_AdaptiveFilterRun_Lib(
|
||||
const cy_stc_capsense_adaptive_filter_config_t * config,
|
||||
cy_stc_capsense_position_t * context,
|
||||
uint32_t * currentX,
|
||||
cy_stc_capsense_position_t * context,
|
||||
uint32_t * currentX,
|
||||
uint32_t * currentY);
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -359,7 +359,7 @@ void Cy_CapSense_AdvancedCentroidGetTouchCoordinates_Lib(
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_BallisticMultiplier_Lib(
|
||||
const cy_stc_capsense_ballistic_config_t * config,
|
||||
const cy_stc_capsense_ballistic_config_t * config,
|
||||
const cy_stc_capsense_touch_t * touch,
|
||||
cy_stc_capsense_ballistic_delta_t * displacement,
|
||||
uint32_t timestamp,
|
||||
@@ -385,9 +385,9 @@ void Cy_CapSense_BallisticMultiplier_Lib(
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_AlpRun_Lib(
|
||||
cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj,
|
||||
cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj,
|
||||
const cy_stc_capsense_alp_fltr_config_t * ptrFilterConfig,
|
||||
uint16_t * rawCount,
|
||||
uint16_t * rawCount,
|
||||
const uint16_t * baseline);
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -404,7 +404,7 @@ void Cy_CapSense_AlpRun_Lib(
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_CapSense_AlpInitialize_Lib(
|
||||
cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj,
|
||||
cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj,
|
||||
const uint16_t * rawCount);
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -443,18 +443,18 @@ uint32_t Cy_CapSense_AlpGetAverage_Lib(
|
||||
* This internal function tunes the Sense Clock divider.
|
||||
*
|
||||
* Found IDAC code in Single IDAC mode is used to calculate the optimal SnsClk.
|
||||
* The SnsClk divider is set to meet the requirement that the widget
|
||||
* The SnsClk divider is set to meet the requirement that the widget
|
||||
* clock period should be greater than or equal to:
|
||||
* Period > 2*5*R*Cp,
|
||||
* where:
|
||||
* * Cp is the maximum sensor parasitic capacitance within the widget.
|
||||
* * R is the user input value in the expression view of the customizer for a
|
||||
* * R is the user input value in the expression view of the customizer for a
|
||||
* series resistor.
|
||||
*
|
||||
* \param config
|
||||
* The configuration structure.
|
||||
*
|
||||
* \return
|
||||
* \return
|
||||
* Cp in fF (10^-15)
|
||||
*
|
||||
*******************************************************************************/
|
||||
@@ -467,24 +467,24 @@ uint32_t Cy_CapSense_TunePrescalers_Lib(
|
||||
*
|
||||
* Configure scanning resolution to achieve the sufficient sensitivity.
|
||||
*
|
||||
* The function searches the lowest possible resolution that produces signal
|
||||
* The function searches the lowest possible resolution that produces signal
|
||||
* greater than 50 counts (Difference Counts) for user defined finger capacitance.
|
||||
* In addition, function calculates 75%-value of the achieved signal, that becomes
|
||||
* In addition, function calculates 75%-value of the achieved signal, that becomes
|
||||
* candidate to finger threshold.
|
||||
*
|
||||
*
|
||||
* Used equation to calculate signal at resolution 16-bit:
|
||||
* sigPFCmax = (2^16-1) * vRef * snsClk * fingerCap / idacCurrent
|
||||
*
|
||||
* sigPFCmax contains absolute number of difference counts that user receives as
|
||||
* sigPFCmax contains absolute number of difference counts that user receives as
|
||||
* result of sensor scanning at corresponding resolution.
|
||||
*
|
||||
* This function requires non-zero Modulator IDAC code (if IDAC is equal to zero it
|
||||
* This function requires non-zero Modulator IDAC code (if IDAC is equal to zero it
|
||||
* is considered as non-valid use case).
|
||||
*
|
||||
* \param config
|
||||
* The configuration structure.
|
||||
*
|
||||
* \return
|
||||
* \return
|
||||
* Scan resolution
|
||||
*
|
||||
*******************************************************************************/
|
||||
@@ -557,16 +557,16 @@ uint32_t Cy_CapSense_GetSmartSenseNumSubconversions(
|
||||
* This function comprises an algorithm of thresholds auto-tune. The thresholds
|
||||
* object contains updated thresholds after this API is called.
|
||||
*
|
||||
* \param ptrNoiseEnvelope
|
||||
* \param ptrNoiseEnvelope
|
||||
* The pointer to the noise-envelope object in RAM.
|
||||
*
|
||||
* \param ptrThresholds
|
||||
* \param ptrThresholds
|
||||
* The pointer to the thresholds object.
|
||||
*
|
||||
* \param sigPFC
|
||||
* \param sigPFC
|
||||
* Signal per finger capacitance.
|
||||
*
|
||||
* \param startFlag
|
||||
* \param startFlag
|
||||
* The flag indicates a first sensor in a widget.
|
||||
*
|
||||
*******************************************************************************/
|
||||
@@ -582,13 +582,13 @@ void Cy_CapSense_UpdateThresholds_Lib(
|
||||
*
|
||||
* Initializes the noise-envelope filter.
|
||||
*
|
||||
* \param rawCount
|
||||
* \param rawCount
|
||||
* The RawCount value for a given sensor.
|
||||
*
|
||||
* \param sigPFC
|
||||
* \param sigPFC
|
||||
* Signal per finger capacitance.
|
||||
*
|
||||
* \param ptrNoiseEnvelope
|
||||
* \param ptrNoiseEnvelope
|
||||
* The pointer to the noise-envelope RAM object of the sensor.
|
||||
*
|
||||
*******************************************************************************/
|
||||
@@ -603,13 +603,13 @@ void Cy_CapSense_InitializeNoiseEnvelope_Lib(
|
||||
*
|
||||
* Runs the noise-envelope filter.
|
||||
*
|
||||
* \param rawCount
|
||||
* \param rawCount
|
||||
* The RawCount value for a given sensor.
|
||||
*
|
||||
* \param sigPFC
|
||||
* \param sigPFC
|
||||
* Signal per finger capacitance.
|
||||
*
|
||||
* \param ptrNoiseEnvelope
|
||||
* \param ptrNoiseEnvelope
|
||||
* The pointer to the noise-envelope RAM object of the sensor.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
@@ -709,7 +709,7 @@ uint32_t Cy_CapSense_DpProcessCsdWidgetRawCounts(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if (CY_CAPSENSE_ENABLE == CY_CAPSENSE_MULTI_FREQUENCY_SCAN_EN)
|
||||
ptrSnsCxtSns = ptrWdCfg->ptrSnsContext;
|
||||
for (snsIndex = ptrWdCfg->numSns; snsIndex-- > 0u;)
|
||||
@@ -1563,7 +1563,7 @@ void Cy_CapSense_DpProcessCsxTouchpad(
|
||||
}
|
||||
#endif /* (CY_CAPSENSE_DISABLE != CY_CAPSENSE_CSX_TOUCHPAD_EN) */
|
||||
|
||||
#if (CY_CAPSENSE_DISABLE != CY_CAPSENSE_MULTI_FREQUENCY_SCAN_EN)
|
||||
#if (CY_CAPSENSE_DISABLE != CY_CAPSENSE_MULTI_FREQUENCY_SCAN_EN)
|
||||
/*******************************************************************************
|
||||
* Function Name: Cy_CapSense_RunMfsFiltering
|
||||
****************************************************************************//**
|
||||
|
||||
@@ -166,7 +166,7 @@ void Cy_CapSense_DpUpdateThresholds(
|
||||
const cy_stc_capsense_smartsense_csd_noise_envelope_t * ptrNoiseEnvelope,
|
||||
uint32_t startFlag);
|
||||
|
||||
#if (CY_CAPSENSE_DISABLE != CY_CAPSENSE_MULTI_FREQUENCY_SCAN_EN)
|
||||
#if (CY_CAPSENSE_DISABLE != CY_CAPSENSE_MULTI_FREQUENCY_SCAN_EN)
|
||||
void Cy_CapSense_RunMfsFiltering(
|
||||
cy_stc_capsense_sensor_context_t * ptrSnsContext,
|
||||
const cy_stc_capsense_context_t * context);
|
||||
|
||||
@@ -439,7 +439,7 @@ cy_en_capsense_bist_status_t Cy_CapSense_CheckIntegritySensorRawcount(
|
||||
* function with the CY_CAPSENSE_BIST_SNS_INTEGRITY_MASK mask.
|
||||
*
|
||||
* To detect an electrical short or fault condition with resistance
|
||||
* higher than 1500 ohm, the Cy_CapSense_MeasureCapacitanceSensor() (4th Generation)
|
||||
* higher than 1500 ohm, the Cy_CapSense_MeasureCapacitanceSensor() (4th Generation)
|
||||
* or Cy_CapSense_MeasureCapacitanceSensorElectrode() (5th Generation) function can
|
||||
* be used as the fault condition affects the measured sensor capacitance.
|
||||
*
|
||||
|
||||
@@ -44,73 +44,73 @@ void Cy_CapSense_TuInitialize(cy_stc_capsense_context_t * context)
|
||||
* Function Name: Cy_CapSense_RunTuner
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Establishes synchronized operation between the CAPSENSE™ Middleware and
|
||||
* Establishes synchronized operation between the CAPSENSE™ Middleware and
|
||||
* the CAPSENSE™ Tuner tool.
|
||||
*
|
||||
* This function is called periodically in the application program. It serves
|
||||
* the CAPSENSE™ Tuner tool requests and commands to synchronize the operation.
|
||||
* Mostly, the best place to call this function is between processing and next
|
||||
* the CAPSENSE™ Tuner tool requests and commands to synchronize the operation.
|
||||
* Mostly, the best place to call this function is between processing and next
|
||||
* scanning.
|
||||
* If the user changes some parameters in the Tuner tool, the middleware is
|
||||
* If the user changes some parameters in the Tuner tool, the middleware is
|
||||
* re-started - the Tuner issues a restart command to be executed by this
|
||||
* function.
|
||||
*
|
||||
*
|
||||
* The Tuner interface supports two communication protocol: EZI2C and UART.
|
||||
*
|
||||
* To use an EZI2C-based tuner interface, only initialization of the EZI2C
|
||||
* driver and interface is required in the application program. Refer to
|
||||
* the I2C driver documentation for details of the protocol implementation
|
||||
*
|
||||
* To use an EZI2C-based tuner interface, only initialization of the EZI2C
|
||||
* driver and interface is required in the application program. Refer to
|
||||
* the I2C driver documentation for details of the protocol implementation
|
||||
* and data package format by the EZI2C interface.
|
||||
*
|
||||
*
|
||||
* To use a UART-based tuner interface, the user must:
|
||||
* * Initialize the UART driver and interface
|
||||
* * Use a callback function to facilitate data transmission and reception
|
||||
* * Use a callback function to facilitate data transmission and reception
|
||||
* using the UART driver.
|
||||
*
|
||||
* The application program must:
|
||||
*
|
||||
* The application program must:
|
||||
* * Form a transmission data packet
|
||||
* * Validate the data package on receiver implementation prior to passing
|
||||
* * Validate the data package on receiver implementation prior to passing
|
||||
* to the CAPSENSE™ Middleware.
|
||||
*
|
||||
* The transmission packet includes a CAPSENSE™ context structure sandwiched
|
||||
* between a header (0x0D0A) and a tail (0x00FFFF), hence the package size
|
||||
* is dependent on CAPSENSE™ context information. The receiver packet is
|
||||
* 16-byte (fixed length) data explained under the
|
||||
* Cy_CapSense_CheckTunerCmdIntegrity() function.
|
||||
* The Cy_CapSense_CheckTunerCmdIntegrity() function is used to validate
|
||||
*
|
||||
* The transmission packet includes a CAPSENSE™ context structure sandwiched
|
||||
* between a header (0x0D0A) and a tail (0x00FFFF), hence the package size
|
||||
* is dependent on CAPSENSE™ context information. The receiver packet is
|
||||
* 16-byte (fixed length) data explained under the
|
||||
* Cy_CapSense_CheckTunerCmdIntegrity() function.
|
||||
* The Cy_CapSense_CheckTunerCmdIntegrity() function is used to validate
|
||||
* the received data package prior to passing it to the CAPSENSE™ middleware.
|
||||
*
|
||||
*
|
||||
* Periodical calling the Cy_CapSense_RunTuner() function is:
|
||||
* * mandatory for operation of a UART-based tuner interface. The middleware
|
||||
* operation is always synchronous to the Tuner tool.
|
||||
* * optional to periodically call Cy_CapSense_RunTuner() for EZI2C based
|
||||
* * mandatory for operation of a UART-based tuner interface. The middleware
|
||||
* operation is always synchronous to the Tuner tool.
|
||||
* * optional to periodically call Cy_CapSense_RunTuner() for EZI2C based
|
||||
* interface.
|
||||
*
|
||||
* If the Cy_CapSense_RunTuner() function is not periodically called by
|
||||
* the application program, the middleware operation is asynchronous to
|
||||
*
|
||||
* If the Cy_CapSense_RunTuner() function is not periodically called by
|
||||
* the application program, the middleware operation is asynchronous to
|
||||
* the Tuner tool and the following disadvantages are applicable:
|
||||
* * The raw counts displayed in the CAPSENSE™ Tuner tool may be filtered
|
||||
* * The raw counts displayed in the CAPSENSE™ Tuner tool may be filtered
|
||||
* and/or non-filtered. Result - noise and SNR measurements are not accurate.
|
||||
* * The CAPSENSE™ Tuner tool can read sensor data (such as raw counts) from
|
||||
* * The CAPSENSE™ Tuner tool can read sensor data (such as raw counts) from
|
||||
* a scan multiply. Result - noise and SNR measurement are not accurate.
|
||||
* * The CAPSENSE™ Tuner tool and Host controller should not change the
|
||||
* * The CAPSENSE™ Tuner tool and Host controller should not change the
|
||||
* parameters via the Tuner interface - in async mode this leads to
|
||||
* abnormal behavior.
|
||||
* * Displaying detected gestures may be missed.
|
||||
*
|
||||
* \warning
|
||||
* This function executes received commands. Two commands
|
||||
* CY_CAPSENSE_TU_CMD_ONE_SCAN_E and CY_CAPSENSE_TU_CMD_SUSPEND_E change
|
||||
* the FW tuner module state to suspend. In this state, the function waits
|
||||
* until CY_CAPSENSE_TU_CMD_RESUME_E is received. Use a callback mechanism
|
||||
* of command receiving to avoid FW hanging. Refer to
|
||||
* \warning
|
||||
* This function executes received commands. Two commands
|
||||
* CY_CAPSENSE_TU_CMD_ONE_SCAN_E and CY_CAPSENSE_TU_CMD_SUSPEND_E change
|
||||
* the FW tuner module state to suspend. In this state, the function waits
|
||||
* until CY_CAPSENSE_TU_CMD_RESUME_E is received. Use a callback mechanism
|
||||
* of command receiving to avoid FW hanging. Refer to
|
||||
* the Function Usage section for examples.
|
||||
*
|
||||
* \param context
|
||||
* The pointer to the CAPSENSE™ context structure \ref cy_stc_capsense_context_t.
|
||||
*
|
||||
* \return
|
||||
* The return parameter indicates whether a middleware re-start was executed
|
||||
* The return parameter indicates whether a middleware re-start was executed
|
||||
* by this function or not:
|
||||
* - CY_CAPSENSE_STATUS_RESTART_DONE - Based on a received command, the
|
||||
* CAPSENSE™ was re-initialized.
|
||||
@@ -118,22 +118,22 @@ void Cy_CapSense_TuInitialize(cy_stc_capsense_context_t * context)
|
||||
* function.
|
||||
*
|
||||
* \funcusage
|
||||
*
|
||||
*
|
||||
* An example of synchronization with the Tuner tool using EzI2C:
|
||||
* \snippet capsense/snippet/main.c snippet_Cy_CapSense_Tuner_EzI2C
|
||||
*
|
||||
*
|
||||
* An example of synchronization with the Tuner tool using UART.<br>
|
||||
* Tuner Send callback implementation: Transmitting data through UART interface:
|
||||
* \snippet capsense/snippet/main.c snippet_TunerSend
|
||||
*
|
||||
*
|
||||
* Tuner Receive callback implementation: Receiving data from UART interface:
|
||||
* \snippet capsense/snippet/main.c snippet_TunerReceive
|
||||
*
|
||||
*
|
||||
* A part of the main.c FW flow with registering callbacks:
|
||||
* \snippet capsense/snippet/main.c snippet_Cy_CapSense_Tuner_UART
|
||||
*
|
||||
*
|
||||
* Refer to the \ref group_capsense_callbacks section for details.
|
||||
*
|
||||
*
|
||||
*******************************************************************************/
|
||||
uint32_t Cy_CapSense_RunTuner(cy_stc_capsense_context_t * context)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ uint32_t Cy_CapSense_RunTuner(cy_stc_capsense_context_t * context)
|
||||
|
||||
do
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* ONE_SCAN command could be interpreted as two commands:
|
||||
* RESUME till next call of this function and then
|
||||
* SUSPEND till next command receiving.
|
||||
@@ -278,7 +278,7 @@ uint32_t Cy_CapSense_RunTuner(cy_stc_capsense_context_t * context)
|
||||
}
|
||||
|
||||
} while ((uint8_t)CY_CAPSENSE_TU_FSM_SUSPENDED == tunerState);
|
||||
|
||||
|
||||
return tunerStatus;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ void Cy_CapSense_TuInitialize(cy_stc_capsense_context_t * context);
|
||||
* Function Name: Cy_CapSense_CheckCommandIntegrity
|
||||
****************************************************************************//**
|
||||
*
|
||||
* \deprecated This function is obsolete and kept for backward compatibility only.
|
||||
* \deprecated This function is obsolete and kept for backward compatibility only.
|
||||
* The Cy_CapSense_CheckTunerCmdIntegrity() function should be used instead.
|
||||
*
|
||||
* \param commandPacket
|
||||
|
||||
+17
-17
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[15] =
|
||||
{
|
||||
51, 51, 43, 43, 43, 43, 43, 43, 43, 33, 33, 97, 29, 34, 38,
|
||||
51, 51, 43, 43, 43, 43, 43, 43, 43, 33, 33, 97, 29, 34, 38,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[15] =
|
||||
{
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_psoc6_01_t cyhal_mux0_sources[51] =
|
||||
@@ -769,21 +769,21 @@ const _cyhal_trigger_source_psoc6_01_t cyhal_mux14_sources[38] =
|
||||
|
||||
const _cyhal_trigger_source_psoc6_01_t* cyhal_mux_to_sources[15] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[479] =
|
||||
|
||||
+19
-19
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[17] =
|
||||
{
|
||||
87, 86, 135, 135, 223, 251, 27, 3, 127, 127, 12, 14, 1, 2, 5, 8, 8,
|
||||
87, 86, 135, 135, 223, 251, 27, 3, 127, 127, 12, 14, 1, 2, 5, 8, 8,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[17] =
|
||||
{
|
||||
false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true,
|
||||
false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_psoc6_02_t cyhal_mux0_sources[87] =
|
||||
@@ -1361,23 +1361,23 @@ const _cyhal_trigger_source_psoc6_02_t cyhal_mux16_sources[8] =
|
||||
|
||||
const _cyhal_trigger_source_psoc6_02_t* cyhal_mux_to_sources[17] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[107] =
|
||||
|
||||
+21
-21
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[19] =
|
||||
{
|
||||
87, 87, 136, 136, 227, 255, 27, 3, 139, 127, 2, 12, 14, 1, 7, 3, 8, 8, 1,
|
||||
87, 87, 136, 136, 227, 255, 27, 3, 139, 127, 2, 12, 14, 1, 7, 3, 8, 8, 1,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[19] =
|
||||
{
|
||||
false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true,
|
||||
false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_psoc6_03_t cyhal_mux0_sources[87] =
|
||||
@@ -1398,25 +1398,25 @@ const _cyhal_trigger_source_psoc6_03_t cyhal_mux18_sources[1] =
|
||||
|
||||
const _cyhal_trigger_source_psoc6_03_t* cyhal_mux_to_sources[19] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[108] =
|
||||
|
||||
+23
-23
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[21] =
|
||||
{
|
||||
87, 87, 139, 139, 229, 256, 27, 3, 139, 127, 2, 51, 12, 14, 1, 7, 3, 8, 8, 1, 1,
|
||||
87, 87, 139, 139, 229, 256, 27, 3, 139, 127, 2, 51, 12, 14, 1, 7, 3, 8, 8, 1, 1,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[21] =
|
||||
{
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_psoc6_04_t cyhal_mux0_sources[87] =
|
||||
@@ -1467,27 +1467,27 @@ const _cyhal_trigger_source_psoc6_04_t cyhal_mux20_sources[1] =
|
||||
|
||||
const _cyhal_trigger_source_psoc6_04_t* cyhal_mux_to_sources[21] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
cyhal_mux19_sources,
|
||||
cyhal_mux20_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
cyhal_mux19_sources,
|
||||
cyhal_mux20_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[112] =
|
||||
|
||||
+17
-17
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[15] =
|
||||
{
|
||||
25, 54, 54, 46, 64, 3, 19, 2, 3, 3, 4, 5, 1, 1, 2,
|
||||
25, 54, 54, 46, 64, 3, 19, 2, 3, 3, 4, 5, 1, 1, 2,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[15] =
|
||||
{
|
||||
false, false, false, false, false, false, false, false, false, false, true, true, true, true, true,
|
||||
false, false, false, false, false, false, false, false, false, false, true, true, true, true, true,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_cyw20829_t cyhal_mux0_sources[25] =
|
||||
@@ -388,21 +388,21 @@ const _cyhal_trigger_source_cyw20829_t cyhal_mux14_sources[2] =
|
||||
|
||||
const _cyhal_trigger_source_cyw20829_t* cyhal_mux_to_sources[15] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[59] =
|
||||
|
||||
+26
-26
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[24] =
|
||||
{
|
||||
69, 63, 82, 7, 0, 172, 94, 50, 9, 16, 188, 124, 156, 12, 72, 22, 2, 12, 6, 72, 72, 4, 4, 16,
|
||||
69, 63, 82, 7, 0, 172, 94, 50, 9, 16, 188, 124, 156, 12, 72, 22, 2, 12, 6, 72, 72, 4, 4, 16,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[24] =
|
||||
{
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_xmc7100_t cyhal_mux0_sources[69] =
|
||||
@@ -1458,30 +1458,30 @@ const _cyhal_trigger_source_xmc7100_t cyhal_mux23_sources[16] =
|
||||
|
||||
const _cyhal_trigger_source_xmc7100_t* cyhal_mux_to_sources[24] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
NULL,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
cyhal_mux19_sources,
|
||||
cyhal_mux20_sources,
|
||||
cyhal_mux21_sources,
|
||||
cyhal_mux22_sources,
|
||||
cyhal_mux23_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
NULL,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
cyhal_mux19_sources,
|
||||
cyhal_mux20_sources,
|
||||
cyhal_mux21_sources,
|
||||
cyhal_mux22_sources,
|
||||
cyhal_mux23_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[407] =
|
||||
|
||||
+29
-29
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[27] =
|
||||
{
|
||||
96, 77, 127, 7, 103, 168, 112, 69, 12, 16, 239, 178, 198, 15, 96, 22, 2, 15, 6, 96, 96, 5, 5, 20, 2, 2, 2,
|
||||
96, 77, 127, 7, 103, 168, 112, 69, 12, 16, 239, 178, 198, 15, 96, 22, 2, 15, 6, 96, 96, 5, 5, 20, 2, 2, 2,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[27] =
|
||||
{
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_xmc7200_t cyhal_mux0_sources[96] =
|
||||
@@ -1936,33 +1936,33 @@ const _cyhal_trigger_source_xmc7200_t cyhal_mux26_sources[2] =
|
||||
|
||||
const _cyhal_trigger_source_xmc7200_t* cyhal_mux_to_sources[27] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
cyhal_mux19_sources,
|
||||
cyhal_mux20_sources,
|
||||
cyhal_mux21_sources,
|
||||
cyhal_mux22_sources,
|
||||
cyhal_mux23_sources,
|
||||
cyhal_mux24_sources,
|
||||
cyhal_mux25_sources,
|
||||
cyhal_mux26_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux7_sources,
|
||||
cyhal_mux8_sources,
|
||||
cyhal_mux9_sources,
|
||||
cyhal_mux10_sources,
|
||||
cyhal_mux11_sources,
|
||||
cyhal_mux12_sources,
|
||||
cyhal_mux13_sources,
|
||||
cyhal_mux14_sources,
|
||||
cyhal_mux15_sources,
|
||||
cyhal_mux16_sources,
|
||||
cyhal_mux17_sources,
|
||||
cyhal_mux18_sources,
|
||||
cyhal_mux19_sources,
|
||||
cyhal_mux20_sources,
|
||||
cyhal_mux21_sources,
|
||||
cyhal_mux22_sources,
|
||||
cyhal_mux23_sources,
|
||||
cyhal_mux24_sources,
|
||||
cyhal_mux25_sources,
|
||||
cyhal_mux26_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[543] =
|
||||
|
||||
+9
-9
@@ -32,12 +32,12 @@
|
||||
|
||||
const uint16_t cyhal_sources_per_mux[7] =
|
||||
{
|
||||
62, 3, 21, 73, 3, 65, 8,
|
||||
62, 3, 21, 73, 3, 65, 8,
|
||||
};
|
||||
|
||||
const bool cyhal_is_mux_1to1[7] =
|
||||
{
|
||||
false, false, false, false, false, false, true,
|
||||
false, false, false, false, false, false, true,
|
||||
};
|
||||
|
||||
const _cyhal_trigger_source_explorer_t cyhal_mux0_sources[62] =
|
||||
@@ -305,13 +305,13 @@ const _cyhal_trigger_source_explorer_t cyhal_mux6_sources[8] =
|
||||
|
||||
const _cyhal_trigger_source_explorer_t* cyhal_mux_to_sources[7] =
|
||||
{
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
cyhal_mux0_sources,
|
||||
cyhal_mux1_sources,
|
||||
cyhal_mux2_sources,
|
||||
cyhal_mux3_sources,
|
||||
cyhal_mux4_sources,
|
||||
cyhal_mux5_sources,
|
||||
cyhal_mux6_sources,
|
||||
};
|
||||
|
||||
const uint8_t cyhal_dest_to_mux[69] =
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/**
|
||||
* \addtogroup group_hal HAL Drivers
|
||||
* This section documents the drivers which form the stable API of the ModusToolbox™ HAL.
|
||||
* This section documents the drivers which form the stable API of the ModusToolboxâ„¢ HAL.
|
||||
* In order to remain portable across platforms and HAL versions, applications should
|
||||
* rely only on functionality documented in this section.
|
||||
*/
|
||||
|
||||
@@ -273,7 +273,7 @@ cy_rslt_t cyhal_adc_init(cyhal_adc_t *obj, cyhal_gpio_t pin, const cyhal_clock_t
|
||||
* @param[out] channels Array of pointers to ADC channel objects. This array must contain
|
||||
* a minimum of one (non-null) entry per channel that is enabled by the configurator
|
||||
* @param[in,out] num_channels Length of the `channels` array. If this value is too small for all of the channels
|
||||
* enabled by the configurator an error will be returned. Will be updated with the
|
||||
* enabled by the configurator an error will be returned. Will be updated with the
|
||||
* number of channels that were enabled by the configurator.
|
||||
* @param[in] cfg Configuration structure generated by the configurator.
|
||||
* @return The status of the init request
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
* signals. The signals are typically provided by a speed/position feedback system mounted on
|
||||
* a motor or trackball. The driver allows the user to invoke a callback function when a
|
||||
* particular event occurs.
|
||||
* The signals, typically called A and B, are positioned 90° out-of-phase, which results in a Gray
|
||||
* The signals, typically called A and B, are positioned 90° out-of-phase, which results in a Gray
|
||||
* code output (a sequence where only one bit changes on each count). It also allows detection of
|
||||
* direction and relative position. A third optional signal, named index, is used as a reference
|
||||
* to establish an absolute position once per rotation.
|
||||
|
||||
@@ -458,7 +458,7 @@ cy_rslt_t cyhal_sdhc_write(cyhal_sdhc_t *obj, uint32_t address, const uint8_t *d
|
||||
* @param[in] start_addr Is the address of the first byte to erase
|
||||
* @param[in] length Number of 512 byte blocks (starting at start_addr) to erase
|
||||
* @param[in] timeout_ms Timeout value in ms for waiting/polling operations. If zero is provided
|
||||
* for this parameter the default value will be used. See implementation specific
|
||||
* for this parameter the default value will be used. See implementation specific
|
||||
* documentation for timeout details.
|
||||
* @return The status of the erase request
|
||||
*
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
* \section subsection_spi_moreinfor More Information
|
||||
*
|
||||
* * <a href="https://github.com/infineon/mtb-example-psoc6-spi-master"><b>mtb-example-psoc6-spi-master</b></a>: This example project demonstrates
|
||||
* use of SPI (HAL) resource in PSoC® 6 MCU in Master mode to write data to an SPI slave.
|
||||
* use of SPI (HAL) resource in PSoC® 6 MCU in Master mode to write data to an SPI slave.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
*
|
||||
* <b>Code examples (Github)</b>
|
||||
* * <a href="https://github.com/infineon/mtb-example-psoc6-tdm" ><b>
|
||||
PSoC™ 6 MCU: Time Division Multiplexing (TDM)</b></a>
|
||||
PSoCâ„¢ 6 MCU: Time Division Multiplexing (TDM)</b></a>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
* The following section shows how to add endpoint to the USB device and configure the endpoint using
|
||||
* \ref cyhal_usb_dev_endpoint_add. The interrupts associated with the endpoints are handled by a
|
||||
* callback function registered using \ref cyhal_usb_dev_register_endpoint_callback.
|
||||
* The endpoint can also be configured using <a href="https://www.cypress.com/ModusToolboxUSBConfig">ModusToolbox™ USB Configurator</a>
|
||||
* The endpoint can also be configured using <a href="https://www.cypress.com/ModusToolboxUSBConfig">ModusToolboxâ„¢ USB Configurator</a>
|
||||
*
|
||||
* \snippet hal_usb_dev.c snippet_cyhal_usb_dev_endpoint
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ extern "C"
|
||||
* \ingroup group_hal_impl_adc
|
||||
* \{
|
||||
* \section group_hal_impl_adc_interconnect Interconnect
|
||||
* In PSoC™ each ADC has a single input trigger which, when activated, will
|
||||
* In PSoCâ„¢ each ADC has a single input trigger which, when activated, will
|
||||
* initiate an ADC scan. Each ADC also has an output trigger which will be
|
||||
* activated when a scan is completed.
|
||||
*/
|
||||
|
||||
@@ -196,7 +196,7 @@ extern const cyhal_resource_inst_t CYHAL_CLOCK_RSC_FAST[_CYHAL_SRSS_NUM_FAST];
|
||||
extern const cyhal_clock_t CYHAL_CLOCK_TIMER;
|
||||
/** Timer Clock: This clock is intended as a source for high-frequency timers, such as the Energy Profiler and CPU SysTick clock. This clock is stopped in the hibernate power mode. */
|
||||
extern const cyhal_resource_inst_t CYHAL_CLOCK_RSC_TIMER;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(COMPONENT_CAT1A) || defined(COMPONENT_CAT1C)
|
||||
/** Slow Clock: This clock is used for the CM0+ CPU, Datawire and CRYPTO components and the associated CPUSS slow infrastructure. */
|
||||
@@ -266,9 +266,9 @@ extern const cyhal_resource_inst_t CYHAL_CLOCK_RSC_HF[SRSS_NUM_HFROOT];
|
||||
|
||||
|
||||
#if defined(PERI_PERI_PCLK_PCLK_GROUP_NR)
|
||||
#define _CYHAL_CLOCK_PERI_GROUPS PERI_PERI_PCLK_PCLK_GROUP_NR
|
||||
#define _CYHAL_CLOCK_PERI_GROUPS PERI_PERI_PCLK_PCLK_GROUP_NR
|
||||
#else
|
||||
#define _CYHAL_CLOCK_PERI_GROUPS 1
|
||||
#define _CYHAL_CLOCK_PERI_GROUPS 1
|
||||
#endif
|
||||
|
||||
cy_rslt_t _cyhal_clock_allocate_channel(cyhal_clock_t *clock, cyhal_clock_block_t block, const void* funcs);
|
||||
@@ -321,7 +321,7 @@ static inline cy_rslt_t _cyhal_clock_allocate_peri(cyhal_clock_t *clock, cyhal_c
|
||||
return _cyhal_clock_allocate_channel(clock, block, funcs);
|
||||
}
|
||||
|
||||
#define cyhal_clock_allocate(clock, block) _cyhal_clock_allocate(clock, block)
|
||||
#define cyhal_clock_allocate(clock, block) _cyhal_clock_allocate(clock, block)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
* \file cyhal_interconnect_impl.h
|
||||
*
|
||||
* \brief
|
||||
* Implementation details for the PSoC™ 4/6 interconnect.
|
||||
* Implementation details for the PSoCâ„¢ 4/6 interconnect.
|
||||
*
|
||||
********************************************************************************
|
||||
* \copyright
|
||||
|
||||
@@ -38,7 +38,7 @@ extern "C" {
|
||||
* \ingroup group_hal_impl
|
||||
* \{
|
||||
* \section group_hal_impl_pwm_interconnect Interconnect
|
||||
* In PSoC™ PWM channels can configure multiple input and output triggers
|
||||
* In PSoCâ„¢ PWM channels can configure multiple input and output triggers
|
||||
* simultaneously. 1 or more input triggers can be configured to initiate
|
||||
* different PWM actions (e.g start, stop, reload, etc) with configurable edge
|
||||
* detection on that incoming signal. Output triggers are based on certain
|
||||
|
||||
@@ -38,7 +38,7 @@ extern "C" {
|
||||
* \ingroup group_hal_impl
|
||||
* \{
|
||||
* \section group_hal_impl_quaddec_interconnect Interconnect
|
||||
* In PSoC™ Quadrature Decoder channels can configure multiple input and output
|
||||
* In PSoCâ„¢ Quadrature Decoder channels can configure multiple input and output
|
||||
* triggers simultaneously. 1 or more input triggers can be configured to
|
||||
* initiate different PWM actions (e.g start, stop, reload, etc) with
|
||||
* configurable edge detection on that incoming signal. Output triggers are
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* \file cyhal_system_impl.h
|
||||
*
|
||||
* \brief
|
||||
* Provides a PSoC™ Specific interface for interacting with the Infineon power
|
||||
* Provides a PSoCâ„¢ Specific interface for interacting with the Infineon power
|
||||
* management and system clock configuration. This interface abstracts out the
|
||||
* chip specific details. If any chip specific functionality is necessary, or
|
||||
* performance is critical the low level functions can be used directly.
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* range that is supported by \ref cyhal_timer_set_frequency is: 1526 hz -
|
||||
* 100 Mhz
|
||||
* \section group_hal_impl_timer_interconnect Interconnect
|
||||
* In PSoC™ Timer channels can configure multiple input and output triggers
|
||||
* In PSoCâ„¢ Timer channels can configure multiple input and output triggers
|
||||
* simultaneously. 1 or more input triggers can be configured to initiate
|
||||
* different Timer actions (e.g start, stop, reload, etc) with configurable
|
||||
* edge detection on that incoming signal. Output triggers are based on certain
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user